Members
globe :Globe
The globe associated with this terrain.
Type:
- Source:
sector :Sector
The sector spanned by this terrain.
Type:
- Source:
(readonly) stateKey :String
A string identifying this terrain's current state. Used to compare states during rendering to
determine whether state dependent cached values must be updated. Applications typically do not
interact with this property.
Type:
- String
- Source:
surfaceGeometry :Array.<TerrainTile>
The surface geometry for this terrain
Type:
- Array.<TerrainTile>
- Source:
tessellator :Tessellator
The tessellator used to generate this terrain.
Type:
- Source:
verticalExaggeration :Number
The vertical exaggeration of this terrain.
Type:
- Number
- Source:
Methods
beginRendering(dc)
Initializes rendering state to draw a succession of terrain tiles.
Parameters:
Name | Type | Description |
---|---|---|
dc |
DrawContext | The current draw context. |
- Source:
beginRenderingTile(dc, terrainTile)
Initializes rendering state for drawing a specified terrain tile.
Parameters:
Name | Type | Description |
---|---|---|
dc |
DrawContext | The current draw context. |
terrainTile |
TerrainTile | The terrain tile subsequently drawn via this tessellator's render function. |
- Source:
Throws:
-
If the specified tile is null or undefined.
- Type
- ArgumentError
endRendering(dc)
Restores rendering state after drawing a succession of terrain tiles.
Parameters:
Name | Type | Description |
---|---|---|
dc |
DrawContext | The current draw context. |
- Source:
endRenderingTile(dc, terrainTile)
Restores rendering state after drawing the most recent tile specified to
beginRenderingTile.
Parameters:
Name | Type | Description |
---|---|---|
dc |
DrawContext | The current draw context. |
terrainTile |
TerrainTile | The terrain tile most recently rendered. |
- Source:
Throws:
-
If the specified tile is null or undefined.
- Type
- ArgumentError
pick(dc)
Causes this terrain to perform the picking operations appropriate for the draw context's pick settings.
Normally, this draws the terrain in a unique pick color and computes the picked terrain position. When the
draw context is set to region picking mode this omits the computation of a picked terrain position.
Parameters:
Name | Type | Description |
---|---|---|
dc |
DrawContext | The current draw context. |
- Source:
renderTile(dc, terrainTile)
Renders a specified terrain tile.
Parameters:
Name | Type | Description |
---|---|---|
dc |
DrawContext | The current draw context. |
terrainTile |
TerrainTile | The terrain tile to render. |
- Source:
Throws:
-
If the specified tile is null or undefined.
- Type
- ArgumentError
surfacePoint(latitude, longitude, offset, result) → {Vec3}
Computes a Cartesian point at a location on the surface of this terrain.
Parameters:
Name | Type | Description |
---|---|---|
latitude |
Number | The location's latitude. |
longitude |
Number | The location's longitude. |
offset |
Number | Distance above the terrain, in meters, at which to compute the point. |
result |
Vec3 | A pre-allocated Vec3 in which to return the computed point. |
- Source:
Throws:
-
If the specified result argument is null or undefined.
- Type
- ArgumentError
Returns:
The specified result parameter, set to the coordinates of the computed point. If the
specfied location is not within this terrain, the associated globe is used to compute the point.
- Type
- Vec3
surfacePointForMode(latitude, longitude, offset, altitudeMode, result) → {Vec3}
Computes a Cartesian point at a location on the surface of this terrain according to a specified
altitude mode.
Parameters:
Name | Type | Description |
---|---|---|
latitude |
Number | The location's latitude. |
longitude |
Number | The location's longitude. |
offset |
Number | Distance above the terrain, in meters relative to the specified altitude mode, at which to compute the point. |
altitudeMode |
String | The altitude mode to use to compute the point. Recognized values are WorldWind.ABSOLUTE, WorldWind.CLAMP_TO_GROUND and WorldWind.RELATIVE_TO_GROUND. The mode WorldWind.ABSOLUTE is used if the specified mode is null, undefined or unrecognized, or if the specified location is outside this terrain. |
result |
Vec3 | A pre-allocated Vec3 in which to return the computed point. |
- Source:
Throws:
-
If the specified result argument is null or undefined.
- Type
- ArgumentError
Returns:
The specified result parameter, set to the coordinates of the computed point.
- Type
- Vec3