Package com.jme3.scene.mesh
Class WrappedIndexBuffer
java.lang.Object
com.jme3.scene.mesh.IndexBuffer
com.jme3.scene.mesh.VirtualIndexBuffer
com.jme3.scene.mesh.WrappedIndexBuffer
WrappedIndexBuffer
converts vertex indices from a non list based
mesh mode such as Mesh.Mode.TriangleStrip
or Mesh.Mode.LineLoop
into a list based mode such as Mesh.Mode.Triangles
or Mesh.Mode.Lines
.
As it is often more convenient to read vertex data in list format
than in a non-list format, using this class is recommended to avoid
complicating classes used to process mesh data from an external source.-
Field Summary
Fields inherited from class com.jme3.scene.mesh.VirtualIndexBuffer
meshMode, numIndices, numVerts, position
-
Constructor Summary
-
Method Summary
Methods inherited from class com.jme3.scene.mesh.VirtualIndexBuffer
get, getFormat, put, put, remaining, rewind, size
Methods inherited from class com.jme3.scene.mesh.IndexBuffer
createIndexBuffer, wrapIndexBuffer
-
Constructor Details
-
WrappedIndexBuffer
-
-
Method Details
-
get
public int get(int i) Description copied from class:IndexBuffer
Returns the vertex index for the given index in the index buffer.- Overrides:
get
in classVirtualIndexBuffer
- Parameters:
i
- The index inside the index buffer- Returns:
- the index
-
getBuffer
Description copied from class:IndexBuffer
Returns the underlying data-type specificBuffer
. Implementations may return null if there's no underlying buffer.- Overrides:
getBuffer
in classVirtualIndexBuffer
- Returns:
- the underlying
Buffer
.
-
convertToList
-