com.bulletphysics.collision.shapes
Class TriangleIndexVertexArray
java.lang.Object
com.bulletphysics.collision.shapes.StridingMeshInterface
com.bulletphysics.collision.shapes.TriangleIndexVertexArray
public class TriangleIndexVertexArray
- extends StridingMeshInterface
Constructor Summary |
TriangleIndexVertexArray()
|
TriangleIndexVertexArray(int numTriangles,
java.nio.ByteBuffer triangleIndexBase,
int triangleIndexStride,
int numVertices,
java.nio.ByteBuffer vertexBase,
int vertexStride)
Just to be backwards compatible. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
indexedMeshes
protected java.util.List<IndexedMesh> indexedMeshes
TriangleIndexVertexArray
public TriangleIndexVertexArray()
TriangleIndexVertexArray
public TriangleIndexVertexArray(int numTriangles,
java.nio.ByteBuffer triangleIndexBase,
int triangleIndexStride,
int numVertices,
java.nio.ByteBuffer vertexBase,
int vertexStride)
- Just to be backwards compatible.
addIndexedMesh
public void addIndexedMesh(IndexedMesh mesh)
addIndexedMesh
public void addIndexedMesh(IndexedMesh mesh,
ScalarType indexType)
getLockedVertexIndexBase
public void getLockedVertexIndexBase(VertexData data,
int subpart)
- Description copied from class:
StridingMeshInterface
- 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.
- Specified by:
getLockedVertexIndexBase
in class StridingMeshInterface
getLockedReadOnlyVertexIndexBase
public void getLockedReadOnlyVertexIndexBase(VertexData data,
int subpart)
- Specified by:
getLockedReadOnlyVertexIndexBase
in class StridingMeshInterface
unLockVertexBase
public 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.
- Specified by:
unLockVertexBase
in class StridingMeshInterface
unLockReadOnlyVertexBase
public void unLockReadOnlyVertexBase(int subpart)
- Specified by:
unLockReadOnlyVertexBase
in class StridingMeshInterface
getNumSubParts
public int getNumSubParts()
- getNumSubParts returns the number of seperate subparts.
Each subpart has a continuous array of vertices and indices.
- Specified by:
getNumSubParts
in class StridingMeshInterface
getIndexedMeshArray
public java.util.List<IndexedMesh> getIndexedMeshArray()
preallocateVertices
public void preallocateVertices(int numverts)
- Specified by:
preallocateVertices
in class StridingMeshInterface
preallocateIndices
public void preallocateIndices(int numindices)
- Specified by:
preallocateIndices
in class StridingMeshInterface