Package com.jme3.bullet.collision.shapes
Class CompoundCollisionShape
java.lang.Object
com.jme3.bullet.collision.shapes.CollisionShape
com.jme3.bullet.collision.shapes.CompoundCollisionShape
- All Implemented Interfaces:
Savable
A CompoundCollisionShape allows combining multiple base shapes
to generate a more sophisticated shape.
-
Field Summary
Fields inherited from class com.jme3.bullet.collision.shapes.CollisionShape
cShape, margin, scale
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addChildShape
(CollisionShape shape, Vector3f location) adds a child shape at the given local translationvoid
addChildShape
(CollisionShape shape, Vector3f location, Matrix3f rotation) adds a child shape at the given local translationvoid
read
(JmeImporter im) void
removeChildShape
(CollisionShape shape) removes a child shapevoid
WARNING - CompoundCollisionShape scaling has no effect.void
write
(JmeExporter ex) Methods inherited from class com.jme3.bullet.collision.shapes.CollisionShape
calculateLocalInertia, getCShape, getDefaultMargin, getMargin, getScale, setCShape, setDefaultMargin, setMargin
-
Field Details
-
children
-
-
Constructor Details
-
CompoundCollisionShape
public CompoundCollisionShape()
-
-
Method Details
-
addChildShape
adds a child shape at the given local translation- Parameters:
shape
- the child shape to addlocation
- the local location of the child shape
-
addChildShape
adds a child shape at the given local translation- Parameters:
shape
- the child shape to addlocation
- the local location of the child shaperotation
- the local orientation of the child shape (not null, unaffected)
-
removeChildShape
removes a child shape- Parameters:
shape
- the child shape to remove
-
getChildren
-
setScale
WARNING - CompoundCollisionShape scaling has no effect.- Overrides:
setScale
in classCollisionShape
-
write
- Specified by:
write
in interfaceSavable
- Overrides:
write
in classCollisionShape
- Throws:
IOException
-
read
- Specified by:
read
in interfaceSavable
- Overrides:
read
in classCollisionShape
- Throws:
IOException
-