public class CompoundCollisionShape extends CollisionShape
| Modifier and Type | Field and Description |
|---|---|
protected java.util.ArrayList<ChildCollisionShape> |
children
children of this shape
|
margin, objectId, scale| Constructor and Description |
|---|
CompoundCollisionShape()
Instantiate an empty compound shape (with no children).
|
| Modifier and Type | Method and Description |
|---|---|
void |
addChildShape(CollisionShape shape,
com.jme3.math.Vector3f location)
Add a child shape with the specified local translation.
|
void |
addChildShape(CollisionShape shape,
com.jme3.math.Vector3f location,
com.jme3.math.Matrix3f rotation)
Add a child shape with the specified local translation and orientation.
|
java.util.List<ChildCollisionShape> |
getChildren()
Access the list of children.
|
void |
read(com.jme3.export.JmeImporter im)
De-serialize this shape, for example when loading from a J3O file.
|
void |
removeChildShape(CollisionShape shape)
Remove a child from this shape.
|
void |
write(com.jme3.export.JmeExporter ex)
Serialize this shape, for example when saving to a J3O file.
|
finalize, getDefaultMargin, getMargin, getObjectId, getScale, isNonMoving, setDefaultMargin, setMargin, setObjectId, setScaleprotected java.util.ArrayList<ChildCollisionShape> children
public CompoundCollisionShape()
public void addChildShape(CollisionShape shape, com.jme3.math.Vector3f location)
shape - the child shape to add (not null, not a compound shape,
alias created)location - the local coordinates of the child shape's center (not
null, unaffected)public void addChildShape(CollisionShape shape, com.jme3.math.Vector3f location, com.jme3.math.Matrix3f rotation)
shape - the child shape to add (not null, not a compound shape,
alias created)location - the local coordinates of the child shape's center (not
null, unaffected)rotation - the local orientation of the child shape (not null,
unaffected)public void removeChildShape(CollisionShape shape)
shape - the child shape to remove (not null)public java.util.List<ChildCollisionShape> getChildren()
public void write(com.jme3.export.JmeExporter ex)
throws java.io.IOException
write in interface com.jme3.export.Savablewrite in class CollisionShapeex - exporter (not null)java.io.IOException - from exporterpublic void read(com.jme3.export.JmeImporter im)
throws java.io.IOException
read in interface com.jme3.export.Savableread in class CollisionShapeim - importer (not null)java.io.IOException - from importer