public class TLcdEarthTerrainTileVertexArray extends TLcdEarthVertexArray
TLcdEarthVertexArray
intended to store 3D terrain geometry tiles. It is assumed that the array
will contain a square grid of vertices, with the size of this square defined
by getTileWidth()
. Optionally, the array may also contain
"curtains", which are downwardly extruded copies of the outer edges of the
tile (these are used to mask the gaps that appear between adjacent tiles of
different resolutions). A terrain tile of width N will contain NxN vertices
if no curtains are present, or NxN + 4xN if curtains are present.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 |
---|
TLcdEarthTerrainTileVertexArray()
Constructs an empty
TLcdEarthTerrainTileVertexArray . |
TLcdEarthTerrainTileVertexArray(TLcdEarthTerrainTileVertexArray aVertexArray)
Constructs a
TLcdEarthTerrainTileVertexArray with the same properties as the specified
vertex array. |
Modifier and Type | Method and Description |
---|---|
int |
getTileWidth()
Returns the width of the vertex grid.
|
BitSet |
getVertexElevationsValid()
Returns the bit set with a boolean indicating the validity of the elevation for each vertex.
|
boolean |
isHasCurtains()
Returns whether this vertex array has curtains.
|
boolean |
isVertexElevationValid(int aVertexIndex)
Returns whether the elevation for the specified vertex is valid.
|
void |
setHasCurtains(boolean aHasCurtains)
Sets whether this vertex array has curtains.
|
void |
setTileWidth(int aTileWidth)
Sets the width of the vertex grid.
|
void |
setVertexElevationsValid(BitSet aVertexElevationsValid)
Returns the bit set with elevation validity for each vertex.
|
void |
setVertexElevationValid(int aVertexIndex,
boolean aValid)
Sets whether the elevation for the specified vertex is valid.
|
getBounds, getCoordinateOrigin, getPrimitiveType, getVertexFormat, getVertices, setBounds, setCoordinateOrigin, setPrimitiveType, setVertexFormat, setVertices
public TLcdEarthTerrainTileVertexArray()
TLcdEarthTerrainTileVertexArray
.public TLcdEarthTerrainTileVertexArray(TLcdEarthTerrainTileVertexArray aVertexArray)
TLcdEarthTerrainTileVertexArray
with the same properties as the specified
vertex array.aVertexArray
- a terrain tile vertex arrayTLcdEarthVertexArray.TLcdEarthVertexArray(TLcdEarthVertexArray)
public boolean isHasCurtains()
public void setHasCurtains(boolean aHasCurtains)
aHasCurtains
- whether this vertex array has curtains.isHasCurtains()
public int getTileWidth()
public void setTileWidth(int aTileWidth)
aTileWidth
- the width of the vertex grid.public BitSet getVertexElevationsValid()
null
public void setVertexElevationsValid(BitSet aVertexElevationsValid)
aVertexElevationsValid
- the bit set with elevation validity for each vertex or null
public boolean isVertexElevationValid(int aVertexIndex)
true
if getVertexElevationsValid()
is null
.aVertexIndex
- the index of the vertex in [0, getTileWidth()2[
public void setVertexElevationValid(int aVertexIndex, boolean aValid)
aVertexIndex
- the index of the vertex in [0, getTileWidth()2[
aValid
- whether the elevation for the specified vertex is valid.isVertexElevationValid(int)