Class PolygonShape
java.lang.Object
com.codename1.gaming.physics.box2d.collision.shapes.Shape
com.codename1.gaming.physics.box2d.collision.shapes.PolygonShape
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncentroidToOut(Transform xf, Vec2 out) final Shapeclone()final voidcomputeAABB(AABB aabb, Transform xf, int childIndex) final voidcomputeCentroidToOut(Vec2[] vs, int count, Vec2 out) voidcomputeMass(MassData massData, float density) intVec2[]final Vec2getVertex(int index) final intVec2[]final booleanraycast(RayCastOutput output, RayCastInput input, Transform xf, int childIndex) final voidfinal voidfinal voidsetAsBox(float hx, float hy) final voidfinal booleanbooleanvalidate()
-
Field Details
-
m_centroid
-
m_vertices
-
m_normals
-
m_count
public int m_count
-
-
Constructor Details
-
PolygonShape
public PolygonShape()
-
-
Method Details
-
clone
-
set
-
set
-
setAsBox
public final void setAsBox(float hx, float hy) -
setAsBox
-
getChildCount
public int getChildCount()- Specified by:
getChildCountin classShape
-
testPoint
-
computeAABB
- Specified by:
computeAABBin classShape
-
getVertexCount
public final int getVertexCount() -
getVertex
-
raycast
public final boolean raycast(RayCastOutput output, RayCastInput input, Transform xf, int childIndex) -
computeCentroidToOut
-
computeMass
- Specified by:
computeMassin classShape
-
validate
public boolean validate() -
getVertices
-
getNormals
-
centroid
-
centroidToOut
-