com.bulletphysics.collision.shapes
Class StridingMeshInterface

java.lang.Object
  extended by com.bulletphysics.collision.shapes.StridingMeshInterface
Direct Known Subclasses:
TriangleIndexVertexArray

public abstract class StridingMeshInterface
extends Object

StridingMeshInterface is the abstract class for high performance access to triangle meshes. It allows for sharing graphics and collision meshes. Also it provides locking/unlocking of graphics meshes that are in GPU memory.


Constructor Summary
StridingMeshInterface()
           
 
Method Summary
 void calculateAabbBruteForce(Vector3f aabbMin, Vector3f aabbMax)
           
abstract  VertexData getLockedReadOnlyVertexIndexBase(int subpart)
           
abstract  VertexData getLockedVertexIndexBase(int subpart)
          Get read and write access to a subpart of a triangle mesh.
abstract  int getNumSubParts()
          getNumSubParts returns the number of seperate subparts.
 Vector3f getScaling(Vector3f out)
           
 void internalProcessAllTriangles(InternalTriangleIndexCallback callback, Vector3f aabbMin, Vector3f aabbMax)
           
abstract  void preallocateIndices(int numindices)
           
abstract  void preallocateVertices(int numverts)
           
 void setScaling(Vector3f scaling)
           
abstract  void unLockReadOnlyVertexBase(int subpart)
           
abstract  void unLockVertexBase(int subpart)
          unLockVertexBase finishes the access to a subpart of the triangle mesh.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StridingMeshInterface

public StridingMeshInterface()
Method Detail

internalProcessAllTriangles

public void internalProcessAllTriangles(InternalTriangleIndexCallback callback,
                                        Vector3f aabbMin,
                                        Vector3f aabbMax)

calculateAabbBruteForce

public void calculateAabbBruteForce(Vector3f aabbMin,
                                    Vector3f aabbMax)

getLockedVertexIndexBase

public abstract VertexData getLockedVertexIndexBase(int subpart)
Get read and write access to a subpart of a triangle mesh. This subpart has a continuous array of vertices and indices. In this way the mesh can be handled as chunks of memory with striding very similar to OpenGL vertexarray support. Make a call to unLockVertexBase when the read and write access is finished.


getLockedReadOnlyVertexIndexBase

public abstract VertexData getLockedReadOnlyVertexIndexBase(int subpart)

unLockVertexBase

public abstract void unLockVertexBase(int subpart)
unLockVertexBase finishes the access to a subpart of the triangle mesh. Make a call to unLockVertexBase when the read and write access (using getLockedVertexIndexBase) is finished.


unLockReadOnlyVertexBase

public abstract void unLockReadOnlyVertexBase(int subpart)

getNumSubParts

public abstract int getNumSubParts()
getNumSubParts returns the number of seperate subparts. Each subpart has a continuous array of vertices and indices.


preallocateVertices

public abstract void preallocateVertices(int numverts)

preallocateIndices

public abstract void preallocateIndices(int numindices)

getScaling

public Vector3f getScaling(Vector3f out)

setScaling

public void setScaling(Vector3f scaling)