public class HullCollisionShape extends CollisionShape
margin, objectId, scale| Modifier | Constructor and Description |
|---|---|
protected |
HullCollisionShape()
No-argument constructor needed by SavableClassUtil.
|
|
HullCollisionShape(float[] points)
Instantiate a collision shape based on the specified array of
coordinates.
|
|
HullCollisionShape(Mesh mesh)
Instantiate a collision shape based on the specified JME mesh.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
createShape()
Instantiate the configured shape in Bullet.
|
protected float[] |
getPoints(Mesh mesh)
Copy the vertex positions from a JME mesh.
|
void |
read(JmeImporter im)
De-serialize this shape, for example when loading from a J3O file.
|
void |
write(JmeExporter ex)
Serialize this shape, for example when saving to a J3O file.
|
finalize, getDefaultMargin, getMargin, getObjectId, getScale, isNonMoving, setDefaultMargin, setMargin, setObjectId, setScaleprotected HullCollisionShape()
public HullCollisionShape(Mesh mesh)
mesh - a mesh on which to base the shape (not null, at least one
vertex)public HullCollisionShape(float[] points)
points - an array of coordinates on which to base the shape (not
null, not empty, length a multiple of 3)public void write(JmeExporter ex) throws java.io.IOException
write in interface Savablewrite in class CollisionShapeex - exporter (not null)java.io.IOException - from exporterpublic void read(JmeImporter im) throws java.io.IOException
read in interface Savableread in class CollisionShapeim - importer (not null)java.io.IOException - from importerprotected void createShape()
protected float[] getPoints(Mesh mesh)
mesh - the mesh to read (not null)