com.bulletphysics.collision.shapes
Class CompoundShape
java.lang.Object
com.bulletphysics.collision.shapes.CollisionShape
com.bulletphysics.collision.shapes.CompoundShape
public class CompoundShape
- extends CollisionShape
CompoundShape allows to store multiple other CollisionShapes.
This allows for concave collision objects. This is more general then the Static Concave TriangleMeshShape.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
localScaling
protected final javax.vecmath.Vector3f localScaling
CompoundShape
public CompoundShape()
addChildShape
public void addChildShape(Transform localTransform,
CollisionShape shape)
removeChildShape
public void removeChildShape(CollisionShape shape)
- Remove all children shapes that contain the specified shape.
getNumChildShapes
public int getNumChildShapes()
getChildShape
public CollisionShape getChildShape(int index)
getChildTransform
public Transform getChildTransform(int index,
Transform out)
getChildList
public java.util.List<CompoundShapeChild> getChildList()
getAabb
public 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.
- Specified by:
getAabb
in class CollisionShape
recalculateLocalAabb
public void recalculateLocalAabb()
- Re-calculate the local Aabb. Is called at the end of removeChildShapes.
Use this yourself if you modify the children or their transforms.
setLocalScaling
public void setLocalScaling(javax.vecmath.Vector3f scaling)
- Specified by:
setLocalScaling
in class CollisionShape
getLocalScaling
public javax.vecmath.Vector3f getLocalScaling(javax.vecmath.Vector3f out)
- Specified by:
getLocalScaling
in class CollisionShape
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
setMargin
public void setMargin(float margin)
- Specified by:
setMargin
in class CollisionShape
getMargin
public float getMargin()
- Specified by:
getMargin
in class CollisionShape
getName
public java.lang.String getName()
- Specified by:
getName
in class CollisionShape
getAabbTree
public OptimizedBvh getAabbTree()