public class TLcdEarthObjectMappedIndexedVertexArray extends TLcdEarthIndexedVertexArray
GL_C3F_V3F, GL_C4F_N3F_V3F, GL_LINE_LOOP, GL_LINE_STRIP, GL_LINES, GL_N3F_V3F, GL_POINTS, GL_POLYGON, GL_QUAD_STRIP, GL_QUADS, GL_T2F_C3F_V3F, GL_T2F_C4F_N3F_V3F, GL_T2F_N3F_V3F, GL_T2F_V3F, GL_T4F_C4F_N3F_V4F, GL_T4F_V4F, GL_TRIANGLE_FAN, GL_TRIANGLE_STRIP, GL_TRIANGLES, GL_V2F, GL_V3F
Constructor and Description |
---|
TLcdEarthObjectMappedIndexedVertexArray()
Creates a new
TLcdEarthObjectMappedIndexedVertexArray . |
Modifier and Type | Method and Description |
---|---|
Object |
getMappedObject(int aElementIndex)
Returns the object that is mapped to the element at the given index in
TLcdEarthIndexedVertexArray.getIndices() . |
Object |
getObject(int aObjectIndex)
Returns the object at the given index.
|
int |
getObjectCount()
Returns the total number of objects that have some data in this vertex array.
|
int |
getObjectEndOffset(int aObjectIndex)
Returns the end offset in
TLcdEarthIndexedVertexArray.getIndices() of the object at the given
index. |
int |
getObjectStartOffset(int aObjectIndex)
Returns the start offset in
TLcdEarthIndexedVertexArray.getIndices() of the object at the
given index. |
void |
setObjects(Object[] aObjects,
int[] aOffsets)
Sets the list of objects whose data is in this vertex array and the
offsets at which these objects can be found in the vertex array.
|
getIndices, setIndices
getBounds, getCoordinateOrigin, getPrimitiveType, getVertexFormat, getVertices, setBounds, setCoordinateOrigin, setPrimitiveType, setVertexFormat, setVertices
public TLcdEarthObjectMappedIndexedVertexArray()
TLcdEarthObjectMappedIndexedVertexArray
. Object
mapping information must be set before this vertex array can be used.setObjects(Object[], int[])
public void setObjects(Object[] aObjects, int[] aOffsets)
aOffsets[i]
should point to
the start of aObjects[i]
in TLcdEarthIndexedVertexArray.getIndices()
. The
objects are assumed to be continuous in TLcdEarthIndexedVertexArray.getIndices()
, i.e. there
should be no holes or unmapped indices in between objects. Hence, the
number of indices corresponding to an object is implied by the offset of
the next object. The last object is assumed to range from its start offset
to the end of TLcdEarthIndexedVertexArray.getIndices()
. The first object's offset is expected
to be 0.
All elements in TLcdEarthIndexedVertexArray.getIndices()
must be mapped to exactly 1 object
(i.e. the first/last end index should exactly be the index of the
first/last element of TLcdEarthIndexedVertexArray.getIndices()
) and the end index should
always be greater than or equal to the start index.
aObjects
- the list of objectsaOffsets
- the list of offsets for the given objectsTLcdEarthIndexedVertexArray.getIndices()
public Object getMappedObject(int aElementIndex)
TLcdEarthIndexedVertexArray.getIndices()
.aElementIndex
- A valid element indexpublic int getObjectCount()
public Object getObject(int aObjectIndex)
aObjectIndex
- An index in [0,getObjectCount()
[.public int getObjectStartOffset(int aObjectIndex)
TLcdEarthIndexedVertexArray.getIndices()
of the object at the
given index. This offset is obtained from the array supplied by
setObjects(Object[], int[])
.aObjectIndex
- An index in [0,getObjectCount()
[.TLcdEarthIndexedVertexArray.getIndices()
public int getObjectEndOffset(int aObjectIndex)
TLcdEarthIndexedVertexArray.getIndices()
of the object at the given
index. This offset is the start offset of the next object minus one, or
the last element of TLcdEarthIndexedVertexArray.getIndices()
in the case of the last object.aObjectIndex
- An index in [0,getObjectCount()
[.TLcdEarthIndexedVertexArray.getIndices()