public class CompoundShape extends CollisionShape
CollisionShape
s. This allows
for moving concave collision objects. This is more general than the BvhTriangleMeshShape
.Modifier and Type | Field and Description |
---|---|
protected javax.vecmath.Vector3f |
localScaling |
userPointer
Constructor and Description |
---|
CompoundShape() |
Modifier and Type | Method and Description |
---|---|
void |
addChildShape(Transform localTransform,
CollisionShape shape) |
void |
calculateLocalInertia(float mass,
javax.vecmath.Vector3f inertia) |
void |
calculatePrincipalAxisTransform(float[] masses,
Transform principal,
javax.vecmath.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,
javax.vecmath.Vector3f aabbMin,
javax.vecmath.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) |
javax.vecmath.Vector3f |
getLocalScaling(javax.vecmath.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(javax.vecmath.Vector3f scaling) |
void |
setMargin(float margin) |
calculateTemporalAabb, getAngularMotionDisc, getBoundingSphere, getUserPointer, isCompound, isConcave, isConvex, isInfinite, isPolyhedral, setUserPointer
public 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, javax.vecmath.Vector3f aabbMin, javax.vecmath.Vector3f aabbMax)
getAabb
in class CollisionShape
public void recalculateLocalAabb()
public void setLocalScaling(javax.vecmath.Vector3f scaling)
setLocalScaling
in class CollisionShape
public javax.vecmath.Vector3f getLocalScaling(javax.vecmath.Vector3f out)
getLocalScaling
in class CollisionShape
public void calculateLocalInertia(float mass, javax.vecmath.Vector3f inertia)
calculateLocalInertia
in class CollisionShape
public BroadphaseNativeType getShapeType()
getShapeType
in class CollisionShape
public void setMargin(float margin)
setMargin
in class CollisionShape
public float getMargin()
getMargin
in class CollisionShape
public String getName()
getName
in class CollisionShape
public OptimizedBvh getAabbTree()
public void calculatePrincipalAxisTransform(float[] masses, Transform principal, javax.vecmath.Vector3f inertia)
Copyright © 2013. All Rights Reserved.