Package com.jme3.bullet.collision.shapes
Class MeshCollisionShape
java.lang.Object
com.jme3.bullet.collision.shapes.CollisionShape
com.jme3.bullet.collision.shapes.MeshCollisionShape
- All Implemented Interfaces:
Savable
Basic mesh collision shape
-
Field Summary
Modifier and TypeFieldDescriptionprotected com.bulletphysics.collision.shapes.IndexedMesh
protected int
protected int
protected ByteBuffer
protected int
protected ByteBuffer
protected int
Fields inherited from class com.jme3.bullet.collision.shapes.CollisionShape
cShape, margin, scale
-
Constructor Summary
ModifierConstructorDescriptionprotected
MeshCollisionShape
(Mesh mesh) Creates a collision shape from the given TriMeshMeshCollisionShape
(Mesh mesh, boolean dummy) API compatibility with native bullet. -
Method Summary
Modifier and TypeMethodDescriptioncreates a jme mesh from the collision shape, only needed for debuggingprotected void
void
read
(JmeImporter im) void
write
(JmeExporter ex) Methods inherited from class com.jme3.bullet.collision.shapes.CollisionShape
calculateLocalInertia, getCShape, getDefaultMargin, getMargin, getScale, setCShape, setDefaultMargin, setMargin, setScale
-
Field Details
-
numVertices
protected int numVertices -
numTriangles
protected int numTriangles -
vertexStride
protected int vertexStride -
triangleIndexStride
protected int triangleIndexStride -
triangleIndexBase
-
vertexBase
-
bulletMesh
protected com.bulletphysics.collision.shapes.IndexedMesh bulletMesh
-
-
Constructor Details
-
MeshCollisionShape
protected MeshCollisionShape() -
MeshCollisionShape
Creates a collision shape from the given TriMesh- Parameters:
mesh
- the TriMesh to use
-
MeshCollisionShape
API compatibility with native bullet.- Parameters:
mesh
- the TriMesh to usedummy
- Unused
-
-
Method Details
-
createJmeMesh
creates a jme mesh from the collision shape, only needed for debugging- Returns:
- a new Mesh
-
write
- Specified by:
write
in interfaceSavable
- Overrides:
write
in classCollisionShape
- Throws:
IOException
-
read
- Specified by:
read
in interfaceSavable
- Overrides:
read
in classCollisionShape
- Throws:
IOException
-
createShape
protected void createShape()
-