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,
Vector3f location)
Add a child shape with the specified local translation.
|
void |
addChildShape(CollisionShape shape,
Vector3f location,
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(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(JmeExporter ex)
Serialize this shape, for example when saving to a J3O file.
|
finalize, getDefaultMargin, getMargin, getObjectId, getScale, isNonMoving, setDefaultMargin, setMargin, setObjectId, setScale
protected java.util.ArrayList<ChildCollisionShape> children
public CompoundCollisionShape()
public void addChildShape(CollisionShape shape, 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, Vector3f location, 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(JmeExporter ex) throws java.io.IOException
write
in interface Savable
write
in class CollisionShape
ex
- exporter (not null)java.io.IOException
- from exporterpublic void read(JmeImporter im) throws java.io.IOException
read
in interface Savable
read
in class CollisionShape
im
- importer (not null)java.io.IOException
- from importer