com.bulletphysics.collision.shapes
Class CapsuleShape
java.lang.Object
com.bulletphysics.collision.shapes.CollisionShape
com.bulletphysics.collision.shapes.ConvexShape
com.bulletphysics.collision.shapes.ConvexInternalShape
com.bulletphysics.collision.shapes.CapsuleShape
- Direct Known Subclasses:
- CapsuleShapeX, CapsuleShapeZ
public class CapsuleShape
- extends ConvexInternalShape
CapsuleShape represents a capsule around the Y axis.
A more general solution that can represent capsules is the MultiSphereShape.
The total height is height+2*radius, so the height is just the height between the center of each 'sphere' of the capsule caps.
Field Summary |
protected int |
upAxis
|
Constructor Summary |
CapsuleShape(float radius,
float height)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
upAxis
protected int upAxis
CapsuleShape
public CapsuleShape(float radius,
float height)
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
getShapeType
public BroadphaseNativeType getShapeType()
- Specified by:
getShapeType
in class CollisionShape
getAabb
public void getAabb(Transform t,
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
getName
public java.lang.String getName()
- Specified by:
getName
in class CollisionShape
getUpAxis
public int getUpAxis()
getRadius
public float getRadius()
getHalfHeight
public float getHalfHeight()