public class CompoundShape extends CollisionShape
CollisionShapes. This allows
for moving concave collision objects. This is more general than the BvhTriangleMeshShape.| Constructor and Description |
|---|
CompoundShape() |
| Modifier and Type | Method and Description |
|---|---|
void |
addChildShape(Transform localTransform,
CollisionShape shape) |
void |
calculateLocalInertia(float mass,
Vector3f inertia) |
void |
calculatePrincipalAxisTransform(float[] masses,
Transform principal,
Vector3f inertia)
Computes the exact moment of inertia and the transform from the coordinate
system defined by the principal axes of the moment of inertia and the center
of mass to the current coordinate system.
|
void |
getAabb(Transform trans,
Vector3f aabbMin,
Vector3f aabbMax)
getAabb's default implementation is brute force, expected derived classes to implement a fast dedicated version.
|
OptimizedBvh |
getAabbTree() |
ObjectArrayList<CompoundShapeChild> |
getChildList() |
CollisionShape |
getChildShape(int index) |
Transform |
getChildTransform(int index,
Transform out) |
Vector3f |
getLocalScaling(Vector3f out) |
float |
getMargin() |
String |
getName() |
int |
getNumChildShapes() |
BroadphaseNativeType |
getShapeType() |
void |
recalculateLocalAabb()
Re-calculate the local Aabb.
|
void |
removeChildShape(CollisionShape shape)
Remove all children shapes that contain the specified shape.
|
void |
setLocalScaling(Vector3f scaling) |
void |
setMargin(float margin) |
calculateTemporalAabb, getAngularMotionDisc, getBoundingSphere, getUserPointer, isCompound, isConcave, isConvex, isInfinite, isPolyhedral, setUserPointerpublic void addChildShape(Transform localTransform, CollisionShape shape)
public void removeChildShape(CollisionShape shape)
public int getNumChildShapes()
public CollisionShape getChildShape(int index)
public ObjectArrayList<CompoundShapeChild> getChildList()
public void getAabb(Transform trans, Vector3f aabbMin, Vector3f aabbMax)
getAabb in class CollisionShapepublic void recalculateLocalAabb()
public void setLocalScaling(Vector3f scaling)
setLocalScaling in class CollisionShapepublic Vector3f getLocalScaling(Vector3f out)
getLocalScaling in class CollisionShapepublic void calculateLocalInertia(float mass,
Vector3f inertia)
calculateLocalInertia in class CollisionShapepublic BroadphaseNativeType getShapeType()
getShapeType in class CollisionShapepublic void setMargin(float margin)
setMargin in class CollisionShapepublic float getMargin()
getMargin in class CollisionShapepublic String getName()
getName in class CollisionShapepublic OptimizedBvh getAabbTree()
public void calculatePrincipalAxisTransform(float[] masses,
Transform principal,
Vector3f inertia)