NASA World Wind

gov.nasa.worldwindx.examples.lineofsight
Class LinesOfSight

java.lang.Object
  extended by gov.nasa.worldwindx.examples.ApplicationTemplate
      extended by gov.nasa.worldwindx.examples.lineofsight.LinesOfSight

public class LinesOfSight
extends ApplicationTemplate

Computes and displays line-of-sight intersections for terrain and renderables. Uses a Terrain 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 a ShapeLineIntersector 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
static class LinesOfSight.AppFrame
           
static class LinesOfSight.ShapeLoaderThread
           
 
Nested classes/interfaces inherited from class gov.nasa.worldwindx.examples.ApplicationTemplate
ApplicationTemplate.AppPanel
 
Field Summary
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 Double TARGET_RESOLUTION
          The desired terrain resolution to use in the intersection calculations.
 
Constructor Summary
LinesOfSight()
           
 
Method Summary
static void main(String[] args)
           
 
Methods inherited from class gov.nasa.worldwindx.examples.ApplicationTemplate
insertAfterPlacenames, insertBeforeCompass, insertBeforeLayerName, insertBeforePlacenames, start
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CACHE_SIZE

protected static final long CACHE_SIZE
The size of the Terrain's cache. *

See Also:
Constant Field Values

GRID_DIMENSION

protected static final int GRID_DIMENSION
The number of cells along each edge of the grid.

See Also:
Constant Field Values

GRID_POSITION_HEIGHT

protected static final int GRID_POSITION_HEIGHT
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_SHAPE_THREADS

protected static final int NUM_SHAPE_THREADS
See Also:
Constant Field Values

NUM_TERRAIN_THREADS

protected static final int NUM_TERRAIN_THREADS
See Also:
Constant Field Values

REFERENCE_POSITION_HEIGHT

protected static final int REFERENCE_POSITION_HEIGHT
See Also:
Constant Field Values

SHOW_ONLY_FIRST_INTERSECTIONS

protected static final boolean SHOW_ONLY_FIRST_INTERSECTIONS
See Also:
Constant Field Values

TARGET_RESOLUTION

protected static final Double TARGET_RESOLUTION
The desired terrain resolution to use in the intersection calculations.

Constructor Detail

LinesOfSight

public LinesOfSight()
Method Detail

main

public static void main(String[] args)

NASA World Wind