com.jme3.bullet.collision.shapes
Class MeshCollisionShape

java.lang.Object
  extended by com.jme3.bullet.collision.shapes.CollisionShape
      extended by com.jme3.bullet.collision.shapes.MeshCollisionShape
All Implemented Interfaces:
Savable

public class MeshCollisionShape
extends CollisionShape

Basic mesh collision shape


Field Summary
protected  long meshId
           
protected  int numTriangles
           
protected  int numVertices
           
protected  java.nio.ByteBuffer triangleIndexBase
           
protected  int triangleIndexStride
           
protected  java.nio.ByteBuffer vertexBase
           
protected  int vertexStride
           
 
Fields inherited from class com.jme3.bullet.collision.shapes.CollisionShape
margin, objectId, scale
 
Constructor Summary
MeshCollisionShape()
           
MeshCollisionShape(Mesh mesh)
          creates a collision shape from the given TriMesh
 
Method Summary
protected  void createShape()
           
protected  void finalize()
           
 void read(JmeImporter im)
           
 void write(JmeExporter ex)
          creates a jme mesh from the collision shape, only needed for debugging
 
Methods inherited from class com.jme3.bullet.collision.shapes.CollisionShape
getMargin, getObjectId, getScale, setMargin, setObjectId, setScale
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

numVertices

protected int numVertices

numTriangles

protected int numTriangles

vertexStride

protected int vertexStride

triangleIndexStride

protected int triangleIndexStride

triangleIndexBase

protected java.nio.ByteBuffer triangleIndexBase

vertexBase

protected java.nio.ByteBuffer vertexBase

meshId

protected long meshId
Constructor Detail

MeshCollisionShape

public MeshCollisionShape()

MeshCollisionShape

public MeshCollisionShape(Mesh mesh)
creates a collision shape from the given TriMesh

Parameters:
mesh - the TriMesh to use
Method Detail

write

public void write(JmeExporter ex)
           throws java.io.IOException
creates a jme mesh from the collision shape, only needed for debugging

Specified by:
write in interface Savable
Overrides:
write in class CollisionShape
Throws:
java.io.IOException

read

public void read(JmeImporter im)
          throws java.io.IOException
Specified by:
read in interface Savable
Overrides:
read in class CollisionShape
Throws:
java.io.IOException

createShape

protected void createShape()

finalize

protected void finalize()
                 throws java.lang.Throwable
Overrides:
finalize in class CollisionShape
Throws:
java.lang.Throwable