Class WrappedIndexBuffer


public class WrappedIndexBuffer extends VirtualIndexBuffer
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.
  • Constructor Details

    • WrappedIndexBuffer

      public WrappedIndexBuffer(Mesh mesh)
  • 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 class VirtualIndexBuffer
      Parameters:
      i - The index inside the index buffer
      Returns:
      the index
    • getBuffer

      public Buffer getBuffer()
      Description copied from class: IndexBuffer
      Returns the underlying data-type specific Buffer. Implementations may return null if there's no underlying buffer.
      Overrides:
      getBuffer in class VirtualIndexBuffer
      Returns:
      the underlying Buffer.
    • convertToList

      public static void convertToList(Mesh mesh)