public class TriangleIndexVertexArray extends StridingMeshInterface
addIndexedMesh.No duplicate is made of the vertex/index data, it only indexes into external vertex/index arrays. So keep those arrays around during the lifetime of this TriangleIndexVertexArray.
| Constructor and Description |
|---|
TriangleIndexVertexArray() |
TriangleIndexVertexArray(int numTriangles,
ByteBuffer triangleIndexBase,
int triangleIndexStride,
int numVertices,
ByteBuffer vertexBase,
int vertexStride)
Just to be backwards compatible.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addIndexedMesh(IndexedMesh mesh) |
void |
addIndexedMesh(IndexedMesh mesh,
ScalarType indexType) |
ObjectArrayList<IndexedMesh> |
getIndexedMeshArray() |
VertexData |
getLockedReadOnlyVertexIndexBase(int subpart) |
VertexData |
getLockedVertexIndexBase(int subpart)
Get read and write access to a subpart of a triangle mesh.
|
int |
getNumSubParts()
getNumSubParts returns the number of seperate subparts.
|
void |
preallocateIndices(int numindices) |
void |
preallocateVertices(int numverts) |
void |
unLockReadOnlyVertexBase(int subpart) |
void |
unLockVertexBase(int subpart)
unLockVertexBase finishes the access to a subpart of the triangle mesh.
|
calculateAabbBruteForce, getScaling, internalProcessAllTriangles, setScalingpublic TriangleIndexVertexArray()
public TriangleIndexVertexArray(int numTriangles,
ByteBuffer triangleIndexBase,
int triangleIndexStride,
int numVertices,
ByteBuffer vertexBase,
int vertexStride)
public void addIndexedMesh(IndexedMesh mesh)
public void addIndexedMesh(IndexedMesh mesh, ScalarType indexType)
public VertexData getLockedVertexIndexBase(int subpart)
StridingMeshInterfacegetLockedVertexIndexBase in class StridingMeshInterfacepublic VertexData getLockedReadOnlyVertexIndexBase(int subpart)
getLockedReadOnlyVertexIndexBase in class StridingMeshInterfacepublic void unLockVertexBase(int subpart)
unLockVertexBase in class StridingMeshInterfacepublic void unLockReadOnlyVertexBase(int subpart)
unLockReadOnlyVertexBase in class StridingMeshInterfacepublic int getNumSubParts()
getNumSubParts in class StridingMeshInterfacepublic ObjectArrayList<IndexedMesh> getIndexedMeshArray()
public void preallocateVertices(int numverts)
preallocateVertices in class StridingMeshInterfacepublic void preallocateIndices(int numindices)
preallocateIndices in class StridingMeshInterface