com.bulletphysics.collision.shapes
Class StridingMeshInterface
java.lang.Object
com.bulletphysics.collision.shapes.StridingMeshInterface
- Direct Known Subclasses:
- TriangleIndexVertexArray
public abstract class StridingMeshInterface
- extends java.lang.Object
StridingMeshInterface is the interface 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.
Field Summary |
protected javax.vecmath.Vector3f |
scaling
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
scaling
protected final javax.vecmath.Vector3f scaling
StridingMeshInterface
public StridingMeshInterface()
internalProcessAllTriangles
public void internalProcessAllTriangles(InternalTriangleIndexCallback callback,
javax.vecmath.Vector3f aabbMin,
javax.vecmath.Vector3f aabbMax)
calculateAabbBruteForce
public void calculateAabbBruteForce(javax.vecmath.Vector3f aabbMin,
javax.vecmath.Vector3f aabbMax)
getLockedVertexIndexBase
public abstract void getLockedVertexIndexBase(VertexData data,
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 void getLockedReadOnlyVertexIndexBase(VertexData data,
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 javax.vecmath.Vector3f getScaling(javax.vecmath.Vector3f out)
setScaling
public void setScaling(javax.vecmath.Vector3f scaling)