Class LinesOfSight
- java.lang.Object
-
- gov.nasa.worldwindx.examples.ApplicationTemplate
-
- gov.nasa.worldwindx.examples.lineofsight.LinesOfSight
-
public class LinesOfSight extends ApplicationTemplate
Computes and displays line-of-sight intersections for terrain and renderables. Uses aTerrain
object in order to determine accurate intersections relative to the highest-resolution elevation data associated with a specified globe.This class uses a
TerrainLineIntersector
and aShapeLineIntersector
to compute the intersections.Usage:
Shift-click: Calculate lines of sight for a position.
Ctrl-click: Cancel the running computation.
Alt-click: Re-run the most recent line of sight calculation.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
LinesOfSight.AppFrame
static class
LinesOfSight.ShapeLoaderThread
-
Nested classes/interfaces inherited from class gov.nasa.worldwindx.examples.ApplicationTemplate
ApplicationTemplate.AppPanel
-
-
Field Summary
Fields Modifier and Type Field Description protected static long
CACHE_SIZE
The size of the Terrain's cache.protected static int
GRID_DIMENSION
The number of cells along each edge of the grid.protected static int
GRID_POSITION_HEIGHT
protected static Angle
GRID_RADIUS
The width and height in degrees of the grid used to calculate intersections.protected static int
NUM_SHAPE_THREADS
protected static int
NUM_TERRAIN_THREADS
protected static int
REFERENCE_POSITION_HEIGHT
protected static boolean
SHOW_ONLY_FIRST_INTERSECTIONS
protected static java.lang.Double
TARGET_RESOLUTION
The desired terrain resolution to use in the intersection calculations.
-
Constructor Summary
Constructors Constructor Description LinesOfSight()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
main(java.lang.String[] args)
-
Methods inherited from class gov.nasa.worldwindx.examples.ApplicationTemplate
insertAfterPlacenames, insertBeforeCompass, insertBeforeLayerName, insertBeforePlacenames, start
-
-
-
-
Field Detail
-
GRID_RADIUS
protected static final Angle GRID_RADIUS
The width and height in degrees of the grid used to calculate intersections.
-
GRID_DIMENSION
protected static final int GRID_DIMENSION
The number of cells along each edge of the grid.- See Also:
- Constant Field Values
-
REFERENCE_POSITION_HEIGHT
protected static final int REFERENCE_POSITION_HEIGHT
- See Also:
- Constant Field Values
-
GRID_POSITION_HEIGHT
protected static final int GRID_POSITION_HEIGHT
- See Also:
- Constant Field Values
-
TARGET_RESOLUTION
protected static final java.lang.Double TARGET_RESOLUTION
The desired terrain resolution to use in the intersection calculations.
-
NUM_TERRAIN_THREADS
protected static final int NUM_TERRAIN_THREADS
- See Also:
- Constant Field Values
-
NUM_SHAPE_THREADS
protected static final int NUM_SHAPE_THREADS
- See Also:
- Constant Field Values
-
CACHE_SIZE
protected static final long CACHE_SIZE
The size of the Terrain's cache. *- See Also:
- Constant Field Values
-
SHOW_ONLY_FIRST_INTERSECTIONS
protected static final boolean SHOW_ONLY_FIRST_INTERSECTIONS
- See Also:
- Constant Field Values
-
-