Package org.oscim.renderer.bucket
Class VertexData
- All Implemented Interfaces:
Iterable<VertexData.Chunk>,Iterator<VertexData.Chunk>
A linked list of array chunks to hold temporary vertex data.
TODO override append() etc to update internal (cur) state.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(float a) voidadd(float a, float b) voidadd(float a, float b, float c) voidadd(float a, float b, float c, float d) voidadd(float a, float b, float c, float d, float e, float f) voidadd(short a) voidadd(short a, short b) voidadd(short a, short b, short c) voidadd(short a, short b, short c, short d) voidadd(short a, short b, short c, short d, short e, short f) clear()Clear list.intcompile(ShortBuffer sbuf) intvoiddispose()booleanempty()Direct access to the current chunk of VertexData.voidvoidreleaseChunk(int size) voidseek(int offset) Do not use!Methods inherited from class org.oscim.utils.pool.Inlist.List
append, appendList, hasNext, head, iterator, next, pop, push, remove, remove, reverse, sizeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliteratorMethods inherited from interface java.util.Iterator
forEachRemaining
-
Field Details
-
SIZE
public static final int SIZESize 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
Description copied from class:Inlist.ListClear list.- Overrides:
clearin classInlist.List<VertexData.Chunk>- Returns:
- head of list
-
dispose
public void dispose() -
compile
- 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
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!
-