com.bulletphysics.collision.shapes
Class PolyhedralConvexShape
java.lang.Object
com.bulletphysics.collision.shapes.CollisionShape
com.bulletphysics.collision.shapes.ConvexShape
com.bulletphysics.collision.shapes.ConvexInternalShape
com.bulletphysics.collision.shapes.PolyhedralConvexShape
- Direct Known Subclasses:
- BoxShape, ConvexHullShape, TriangleShape
public abstract class PolyhedralConvexShape
- extends ConvexInternalShape
PolyhedralConvexShape is an interface class for feature based (vertex/edge/face) convex shapes.
Method Summary |
protected void |
_PolyhedralConvexShape_getAabb(Transform trans,
javax.vecmath.Vector3f aabbMin,
javax.vecmath.Vector3f aabbMax)
|
void |
batchedUnitVectorGetSupportingVertexWithoutMargin(javax.vecmath.Vector3f[] vectors,
javax.vecmath.Vector3f[] supportVerticesOut,
int numVectors)
|
void |
calculateLocalInertia(float mass,
javax.vecmath.Vector3f inertia)
|
void |
getAabb(Transform trans,
javax.vecmath.Vector3f aabbMin,
javax.vecmath.Vector3f aabbMax)
getAabb's default implementation is brute force, expected derived classes to implement a fast dedicated version. |
abstract void |
getEdge(int i,
javax.vecmath.Vector3f pa,
javax.vecmath.Vector3f pb)
|
abstract int |
getNumEdges()
|
abstract int |
getNumPlanes()
|
abstract int |
getNumVertices()
|
abstract void |
getPlane(javax.vecmath.Vector3f planeNormal,
javax.vecmath.Vector3f planeSupport,
int i)
|
abstract void |
getVertex(int i,
javax.vecmath.Vector3f vtx)
|
abstract boolean |
isInside(javax.vecmath.Vector3f pt,
float tolerance)
|
javax.vecmath.Vector3f |
localGetSupportingVertexWithoutMargin(javax.vecmath.Vector3f vec0,
javax.vecmath.Vector3f out)
|
void |
recalcLocalAabb()
|
Methods inherited from class com.bulletphysics.collision.shapes.CollisionShape |
calculateTemporalAabb, getAngularMotionDisc, getBoundingSphere, getName, getShapeType, getUserPointer, isCompound, isConcave, isConvex, isInfinite, isPolyhedral, setUserPointer |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
localAabbMin
protected final javax.vecmath.Vector3f localAabbMin
localAabbMax
protected final javax.vecmath.Vector3f localAabbMax
isLocalAabbValid
protected boolean isLocalAabbValid
PolyhedralConvexShape
public PolyhedralConvexShape()
localGetSupportingVertexWithoutMargin
public javax.vecmath.Vector3f localGetSupportingVertexWithoutMargin(javax.vecmath.Vector3f vec0,
javax.vecmath.Vector3f out)
- Specified by:
localGetSupportingVertexWithoutMargin
in class ConvexShape
batchedUnitVectorGetSupportingVertexWithoutMargin
public void batchedUnitVectorGetSupportingVertexWithoutMargin(javax.vecmath.Vector3f[] vectors,
javax.vecmath.Vector3f[] supportVerticesOut,
int numVectors)
- Specified by:
batchedUnitVectorGetSupportingVertexWithoutMargin
in class ConvexShape
calculateLocalInertia
public void calculateLocalInertia(float mass,
javax.vecmath.Vector3f inertia)
- Specified by:
calculateLocalInertia
in class CollisionShape
getAabb
public void getAabb(Transform trans,
javax.vecmath.Vector3f aabbMin,
javax.vecmath.Vector3f aabbMax)
- Description copied from class:
ConvexInternalShape
- getAabb's default implementation is brute force, expected derived classes to implement a fast dedicated version.
- Overrides:
getAabb
in class ConvexInternalShape
_PolyhedralConvexShape_getAabb
protected final void _PolyhedralConvexShape_getAabb(Transform trans,
javax.vecmath.Vector3f aabbMin,
javax.vecmath.Vector3f aabbMax)
recalcLocalAabb
public void recalcLocalAabb()
getNumVertices
public abstract int getNumVertices()
getNumEdges
public abstract int getNumEdges()
getEdge
public abstract void getEdge(int i,
javax.vecmath.Vector3f pa,
javax.vecmath.Vector3f pb)
getVertex
public abstract void getVertex(int i,
javax.vecmath.Vector3f vtx)
getNumPlanes
public abstract int getNumPlanes()
getPlane
public abstract void getPlane(javax.vecmath.Vector3f planeNormal,
javax.vecmath.Vector3f planeSupport,
int i)
isInside
public abstract boolean isInside(javax.vecmath.Vector3f pt,
float tolerance)