Class ChildCollisionShape
java.lang.Object
com.jme3.bullet.collision.shapes.infos.ChildCollisionShape
- All Implemented Interfaces:
Savable
An element of a CompoundCollisionShape, consisting of a (non-compound) child
shape, offset and rotated with respect to its parent.
This class is shared between JBullet and Native Bullet.
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedNo-argument constructor needed by SavableClassUtil.ChildCollisionShape(Vector3f location, Matrix3f rotation, CollisionShape shape) Instantiate a child shape for use in a compound shape. -
Method Summary
Modifier and TypeMethodDescriptionvoidread(JmeImporter im) De-serialize this shape, for example when loading from a J3O file.voidwrite(JmeExporter ex) Serialize this shape, for example when saving to a J3O file.
-
Field Details
-
location
translation relative to parent shape (not null) -
rotation
rotation relative to parent shape (not null) -
shape
base shape (not null, not a compound shape)
-
-
Constructor Details
-
ChildCollisionShape
protected ChildCollisionShape()No-argument constructor needed by SavableClassUtil. Do not invoke directly! -
ChildCollisionShape
Instantiate a child shape for use in a compound shape.- Parameters:
location- translation relative to the parent (not null, alias created)rotation- rotation relative to the parent (not null, alias created)shape- the base shape (not null, not a compound shape, alias created)
-
-
Method Details
-
write
Serialize this shape, for example when saving to a J3O file.- Specified by:
writein interfaceSavable- Parameters:
ex- exporter (not null)- Throws:
IOException- from exporter
-
read
De-serialize this shape, for example when loading from a J3O file.- Specified by:
readin interfaceSavable- Parameters:
im- importer (not null)- Throws:
IOException- from importer
-