Reference
- Body Classes
-
Body Functions
- (PPBox)getHeight()
- (PPBox)getWidth()
- (PPBox)setSize()
- (PPCircle)getSize()
- (PPCircle)setSize()
- addExcludedBody()
- addForce()
- adjustAngularVelocity()
- adjustVelocity()
- applyMatrix()
- attachImage()
- dettachImage()
- getAngularVelocity()
- getImageAlpha()
- getRotation()
- getVelocityX()
- getVelocityY()
- getX()
- getY()
- isResting()
- isStatic()
- isTouchingBody()
- resetForces()
- setAngularVelocity()
- setDamping()
- setDrawable()
- setFillColor()
- setFriction()
- setGravityEffected()
- setImageAlpha()
- setMass()
- setPosition()
- setRestitution()
- setRotatable()
- setRotation()
- setRotDamping()
- setStaticBody()
- setStrokeColor()
- setStrokeWidth()
- setVelocity()
- World Classes
- World Fucntions
PPConvexPoly
Description
Create a convex polygon shape. By defaults, it creates a triangle. Use the vertex() function to create a custom shape. When creating a basic shape, remember that the gravity center and the drawing center is the (0,0) of your shape. Also be sure that your polygon is convex and has at least 3 points.
Exemples
PPConvexPoly myPoly1 = new PPConvexPoly();
myPoly1.vertex(-20, -10);
myPoly1.vertex(20, -10);
myPoly1.vertex(0, 10);
world.add(myPoly1);
Syntax
PPConvexPoly();
Parameters
none