Class MeshCollisionShape

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

public class MeshCollisionShape extends CollisionShape
Basic mesh collision shape
Author:
normenhansen
  • Field Details

    • numVertices

      protected int numVertices
    • numTriangles

      protected int numTriangles
    • vertexStride

      protected int vertexStride
    • triangleIndexStride

      protected int triangleIndexStride
    • triangleIndexBase

      protected ByteBuffer triangleIndexBase
    • vertexBase

      protected ByteBuffer vertexBase
    • bulletMesh

      protected com.bulletphysics.collision.shapes.IndexedMesh bulletMesh
  • Constructor Details

    • MeshCollisionShape

      protected MeshCollisionShape()
    • MeshCollisionShape

      public MeshCollisionShape(com.jme3.scene.Mesh mesh)
      Creates a collision shape from the given TriMesh
      Parameters:
      mesh - the TriMesh to use
    • MeshCollisionShape

      public MeshCollisionShape(com.jme3.scene.Mesh mesh, boolean dummy)
      API compatibility with native bullet.
      Parameters:
      mesh - the TriMesh to use
      dummy - Unused
  • Method Details

    • createJmeMesh

      public com.jme3.scene.Mesh createJmeMesh()
      creates a jme mesh from the collision shape, only needed for debugging
      Returns:
      a new Mesh
    • write

      public void write(com.jme3.export.JmeExporter ex) throws IOException
      Specified by:
      write in interface com.jme3.export.Savable
      Overrides:
      write in class CollisionShape
      Throws:
      IOException
    • read

      public void read(com.jme3.export.JmeImporter im) throws IOException
      Specified by:
      read in interface com.jme3.export.Savable
      Overrides:
      read in class CollisionShape
      Throws:
      IOException
    • createShape

      protected void createShape()