Class TLcdEarthTerrainTileVertexArray
java.lang.Object
com.luciad.earth.tileset.datatype.TLcdEarthVertexArray
com.luciad.earth.tileset.datatype.TLcdEarthTerrainTileVertexArray
- All Implemented Interfaces:
ILcdBounded
An extension of
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.- Since:
- 8.2
-
Field Summary
Fields inherited from class com.luciad.earth.tileset.datatype.TLcdEarthVertexArray
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 Summary
ConstructorDescriptionConstructs an emptyTLcdEarthTerrainTileVertexArray
.Constructs aTLcdEarthTerrainTileVertexArray
with the same properties as the specified vertex array. -
Method Summary
Modifier and TypeMethodDescriptionint
Returns the width of the vertex grid.Returns the bit set with a boolean indicating the validity of the elevation for each vertex.boolean
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.Methods inherited from class com.luciad.earth.tileset.datatype.TLcdEarthVertexArray
getBounds, getCoordinateOrigin, getPrimitiveType, getVertexFormat, getVertices, setBounds, setCoordinateOrigin, setPrimitiveType, setVertexFormat, setVertices
-
Constructor Details
-
TLcdEarthTerrainTileVertexArray
public TLcdEarthTerrainTileVertexArray()Constructs an emptyTLcdEarthTerrainTileVertexArray
. -
TLcdEarthTerrainTileVertexArray
Constructs aTLcdEarthTerrainTileVertexArray
with the same properties as the specified vertex array.- Parameters:
aVertexArray
- a terrain tile vertex array- See Also:
-
-
Method Details
-
isHasCurtains
public boolean isHasCurtains()Returns whether this vertex array has curtains. Curtains are downwardly extruded copies of the outer edges of the tile. They are used to mask the gaps that appear between adjacent tiles of different resolutions.- Returns:
- whether this vertex array has curtains
-
setHasCurtains
public void setHasCurtains(boolean aHasCurtains) Sets whether this vertex array has curtains.- Parameters:
aHasCurtains
- whether this vertex array has curtains.- See Also:
-
getTileWidth
public int getTileWidth()Returns the width of the vertex grid.- Returns:
- the width of the vertex grid.
-
setTileWidth
public void setTileWidth(int aTileWidth) Sets the width of the vertex grid.- Parameters:
aTileWidth
- the width of the vertex grid.
-
getVertexElevationsValid
Returns the bit set with a boolean indicating the validity of the elevation for each vertex. If there is no valid elevation available it is still necessary to have valid geometry in order to allow draping textures on top. In such a case a default elevation value is used for the vertex. This method can be used to check whether a vertex actually has a valid elevation value or has such a default value.- Returns:
- the bit set with elevation validity for each vertex or
null
-
setVertexElevationsValid
Returns the bit set with elevation validity for each vertex.- Parameters:
aVertexElevationsValid
- the bit set with elevation validity for each vertex ornull
-
isVertexElevationValid
public boolean isVertexElevationValid(int aVertexIndex) Returns whether the elevation for the specified vertex is valid. If there is no valid elevation available it is still necessary to have valid geometry in order to allow draping textures on top. In such a case a default elevation value is used for the vertex. This method can be used to check whether a vertex actually has a valid elevation value or has such a default value. This method returnstrue
ifgetVertexElevationsValid()
isnull
.- Parameters:
aVertexIndex
- the index of the vertex in[0, getTileWidth()2[
- Returns:
- whether the elevation for the specified vertex is valid.
-
setVertexElevationValid
public void setVertexElevationValid(int aVertexIndex, boolean aValid) Sets whether the elevation for the specified vertex is valid.- Parameters:
aVertexIndex
- the index of the vertex in[0, getTileWidth()2[
aValid
- whether the elevation for the specified vertex is valid.- See Also:
-