Class VertexData

All Implemented Interfaces:
Iterable<VertexData.Chunk>, Iterator<VertexData.Chunk>

public class VertexData extends Inlist.List<VertexData.Chunk>
A linked list of array chunks to hold temporary vertex data.

TODO override append() etc to update internal (cur) state.

  • Field Details

    • SIZE

      public static final int SIZE
      Size of array chunks. Must be multiple of: 4 (LineLayer/PolygonLayer), 24 (TexLineLayer - one block, i.e. two segments) 24 (TextureLayer)
      See Also:
  • Constructor Details

    • VertexData

      public VertexData()
  • Method Details

    • countSize

      public int countSize()
    • clear

      public VertexData.Chunk clear()
      Description copied from class: Inlist.List
      Clear list.
      Overrides:
      clear in class Inlist.List<VertexData.Chunk>
      Returns:
      head of list
    • dispose

      public void dispose()
    • compile

      public int compile(ShortBuffer sbuf)
      Returns:
      sum of elements added
    • add

      public void add(float a)
    • add

      public void add(short a)
    • add

      public void add(float a, float b)
    • add

      public void add(short a, short b)
    • add

      public void add(float a, float b, float c)
    • add

      public void add(short a, short b, short c)
    • add

      public void add(float a, float b, float c, float d)
    • add

      public void add(short a, short b, short c, short d)
    • add

      public void add(float a, float b, float c, float d, float e, float f)
    • add

      public void add(short a, short b, short c, short d, short e, short f)
    • empty

      public boolean empty()
    • obtainChunk

      public VertexData.Chunk obtainChunk()
      Direct access to the current chunk of VertexData. Use with care!

      When changing the position use releaseChunk to update internal state

    • releaseChunk

      public void releaseChunk()
    • releaseChunk

      public void releaseChunk(int size)
    • seek

      public void seek(int offset)
      Do not use!