public class GImpactCollisionShape extends CollisionShape
Modifier and Type | Field and Description |
---|---|
protected long |
meshId
Unique identifier of the Bullet mesh.
|
protected int |
numTriangles |
protected int |
numVertices |
protected java.nio.ByteBuffer |
triangleIndexBase |
protected int |
triangleIndexStride |
protected java.nio.ByteBuffer |
vertexBase |
protected int |
vertexStride |
margin, objectId, scale
Modifier | Constructor and Description |
---|---|
protected |
GImpactCollisionShape()
No-argument constructor needed by SavableClassUtil.
|
|
GImpactCollisionShape(Mesh mesh)
Instantiate a shape based on the specified JME mesh.
|
Modifier and Type | Method and Description |
---|---|
protected void |
createShape()
Instantiate the configured shape in Bullet.
|
protected void |
finalize()
Finalize this shape just before it is destroyed.
|
void |
read(JmeImporter im)
De-serialize this shape, for example when loading from a J3O file.
|
void |
setScale(Vector3f scale)
Alter the scaling factors of this shape.
|
void |
write(JmeExporter ex)
Serialize this shape, for example when saving to a J3O file.
|
getDefaultMargin, getMargin, getObjectId, getScale, isNonMoving, setDefaultMargin, setMargin, setObjectId
protected int numVertices
protected int numTriangles
protected int vertexStride
protected int triangleIndexStride
protected java.nio.ByteBuffer triangleIndexBase
protected java.nio.ByteBuffer vertexBase
protected long meshId
protected GImpactCollisionShape()
public GImpactCollisionShape(Mesh mesh)
mesh
- the Mesh to usepublic 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 importerpublic void setScale(Vector3f scale)
Note that if the shape is shared (between collision objects and/or compound shapes) changes can have unintended consequences.
setScale
in class CollisionShape
scale
- the desired scaling factor for each local axis (not null, no
negative component, unaffected, default=(1,1,1))protected void createShape()
protected void finalize() throws java.lang.Throwable
finalize
in class CollisionShape
java.lang.Throwable
- ignored by the garbage collector