gov.nasa.worldwindx.examples
Class TerrainIntersections
java.lang.Object
gov.nasa.worldwindx.examples.ApplicationTemplate
gov.nasa.worldwindx.examples.TerrainIntersections
public class TerrainIntersections
- extends ApplicationTemplate
Shows how to compute terrain intersections using the highest resolution terrain data available from a globe's
elevation model.
To generate and show intersections, Shift + LeftClick anywhere on the globe. The program forms a grid of locations
around the selected location. The grid points are shown in yellow. It then determines whether a line between the
selected location and each grid point intersects the terrain. If it does, the intersection nearest the selected
location is shown in cyan and a line is drawn from the selected location to the intersection. If there is no
intersection, a line is drawn from the selected location to the grid position.
If the highest resolution terrain is not available for the area around the selected location, it is retrieved from
the elevation model's source, which is most likely a remote server. Since the high-res data must be retrieved and
then loaded from the local disk cache, it will take some time to compute and show the intersections.
This example uses a Terrain object to perform the terrain retrieval, generation
and intersection calculations.s
|
Field Summary |
protected static int |
GRID_DIMENSION
The number of cells along each edge of the grid. |
protected static Angle |
GRID_RADIUS
The width and height in degrees of the grid used to calculate intersections. |
protected static int |
NUM_THREADS
|
protected static Double |
TARGET_RESOLUTION
The desired terrain resolution to use in the intersection calculations. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GRID_DIMENSION
protected static final int GRID_DIMENSION
- The number of cells along each edge of the grid.
- See Also:
- Constant Field Values
GRID_RADIUS
protected static final Angle GRID_RADIUS
- The width and height in degrees of the grid used to calculate intersections.
NUM_THREADS
protected static final int NUM_THREADS
- See Also:
- Constant Field Values
TARGET_RESOLUTION
protected static final Double TARGET_RESOLUTION
- The desired terrain resolution to use in the intersection calculations.
TerrainIntersections
public TerrainIntersections()
main
public static void main(String[] args)