public class CapsuleShape extends ConvexInternalShape
CapsuleShapeX aligned around the X axis and CapsuleShapeZ around
the Z axis.The total height is height+2*radius, so the height is just the height between the center of each "sphere" of the capsule caps.
CapsuleShape is a convex hull of two spheres. The MultiSphereShape is
a more general collision shape that takes the convex hull of multiple sphere,
so it can also represent a capsule when just using two spheres.
MAX_PREFERRED_PENETRATION_DIRECTIONS| Constructor and Description |
|---|
CapsuleShape(float radius,
float height) |
| Modifier and Type | Method and Description |
|---|---|
void |
batchedUnitVectorGetSupportingVertexWithoutMargin(Vector3f[] vectors,
Vector3f[] supportVerticesOut,
int numVectors) |
void |
calculateLocalInertia(float mass,
Vector3f inertia) |
void |
getAabb(Transform t,
Vector3f aabbMin,
Vector3f aabbMax)
getAabb's default implementation is brute force, expected derived classes to implement a fast dedicated version.
|
float |
getHalfHeight() |
String |
getName() |
float |
getRadius() |
BroadphaseNativeType |
getShapeType() |
int |
getUpAxis() |
Vector3f |
localGetSupportingVertexWithoutMargin(Vector3f vec0,
Vector3f out) |
getAabbSlow, getLocalScaling, getMargin, getNumPreferredPenetrationDirections, getPreferredPenetrationDirection, localGetSupportingVertex, setLocalScaling, setMargincalculateTemporalAabb, getAngularMotionDisc, getBoundingSphere, getUserPointer, isCompound, isConcave, isConvex, isInfinite, isPolyhedral, setUserPointerpublic Vector3f localGetSupportingVertexWithoutMargin(Vector3f vec0, Vector3f out)
localGetSupportingVertexWithoutMargin in class ConvexShapepublic void batchedUnitVectorGetSupportingVertexWithoutMargin(Vector3f[] vectors, Vector3f[] supportVerticesOut, int numVectors)
batchedUnitVectorGetSupportingVertexWithoutMargin in class ConvexShapepublic void calculateLocalInertia(float mass,
Vector3f inertia)
calculateLocalInertia in class CollisionShapepublic BroadphaseNativeType getShapeType()
getShapeType in class CollisionShapepublic void getAabb(Transform t, Vector3f aabbMin, Vector3f aabbMax)
ConvexInternalShapegetAabb in class ConvexInternalShapepublic String getName()
getName in class CollisionShapepublic int getUpAxis()
public float getRadius()
public float getHalfHeight()