Package advanced.physics.physicsShapes

Examples of advanced.physics.physicsShapes.PhysicsPolygon


        new Vertex(-60,70,0),
        new Vertex(-60,50,0),
        new Vertex(-10,50,0),
        new Vertex(-10,0,0),
    };
    PhysicsPolygon physPoly = new PhysicsPolygon(polyVertices, new Vector3D(250,250), app, world, 1.0f, 0.3f, 0.4f, scale);
    MTColor polyCol = new MTColor(ToolsMath.getRandom(60, 255),ToolsMath.getRandom(60, 255),ToolsMath.getRandom(60, 255));
    physPoly.setFillColor(polyCol);
    physPoly.setStrokeColor(polyCol);
    PhysicsHelper.addDragJoint(world, physPoly, physPoly.getBody().isDynamic(), scale);
    //For an anti-aliased outline
    List<Vertex[]> contours = new ArrayList<Vertex[]>();
    contours.add(polyVertices);
    physPoly.setOutlineContours(contours);
    physPoly.setNoStroke(false);
    physicsContainer.addChild(physPoly);
  }
View Full Code Here

TOP

Related Classes of advanced.physics.physicsShapes.PhysicsPolygon

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.