org.jbox2d.collision
Class PolygonShape
java.lang.Object
org.jbox2d.collision.Shape
org.jbox2d.collision.PolygonShape
- All Implemented Interfaces:
- SupportsGenericDistance
public class PolygonShape
- extends Shape
- implements SupportsGenericDistance
Fields inherited from class org.jbox2d.collision.Shape |
m_body, m_categoryBits, m_density, m_friction, m_groupIndex, m_isSensor, m_maskBits, m_next, m_proxyId, m_restitution, m_sweepRadius, m_type, m_userData, uid |
Methods inherited from class org.jbox2d.collision.Shape |
create, createProxy, destroy, destroyProxy, destructor, getBody, getNext, getSweepRadius, getType, getUserData, isSensor, resetProxy, synchronize |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
m_centroid
public Vec2 m_centroid
m_obb
public OBB m_obb
m_vertices
public Vec2[] m_vertices
m_normals
public Vec2[] m_normals
m_coreVertices
public Vec2[] m_coreVertices
m_vertexCount
public int m_vertexCount
PolygonShape
public PolygonShape(ShapeDef def)
updateSweepRadius
public void updateSweepRadius(Vec2 center)
- Specified by:
updateSweepRadius
in class Shape
testPoint
public boolean testPoint(XForm xf,
Vec2 p)
- Specified by:
testPoint
in class Shape
centroid
public Vec2 centroid(XForm xf)
support
public Vec2 support(XForm xf,
Vec2 d)
- Specified by:
support
in interface SupportsGenericDistance
computeCentroid
public static Vec2 computeCentroid(java.util.List<Vec2> vs)
computeOBB
public static void computeOBB(OBB obb,
Vec2[] vs)
computeAABB
public void computeAABB(AABB aabb,
XForm xf)
- Specified by:
computeAABB
in class Shape
computeSweptAABB
public void computeSweptAABB(AABB aabb,
XForm transform1,
XForm transform2)
- Specified by:
computeSweptAABB
in class Shape
computeMass
public void computeMass(MassData massData)
- Specified by:
computeMass
in class Shape
getFirstVertex
public Vec2 getFirstVertex(XForm xf)
- Specified by:
getFirstVertex
in interface SupportsGenericDistance
getOBB
public OBB getOBB()
getCentroid
public Vec2 getCentroid()
getVertexCount
public int getVertexCount()
getVertices
public Vec2[] getVertices()
getCoreVertices
public Vec2[] getCoreVertices()