NASA World Wind

gov.nasa.worldwindx.examples.lineofsight
Class ShapeLineIntersector

java.lang.Object
  extended by gov.nasa.worldwindx.examples.lineofsight.LineIntersector
      extended by gov.nasa.worldwindx.examples.lineofsight.ShapeLineIntersector
All Implemented Interfaces:
Runnable

public class ShapeLineIntersector
extends LineIntersector

Computes the intersections of a collection of lines with collection of Renderables. The lines are specified with a common origin and multiple end positions. For each end position this class computes the intersections of all specified renderables with a line between that position and a reference position. See LineIntersector.setReferencePosition(gov.nasa.worldwind.geom.Position) and setRenderables(Iterable).


Nested Class Summary
 
Nested classes/interfaces inherited from class gov.nasa.worldwindx.examples.lineofsight.LineIntersector
LineIntersector.InternalIntersector
 
Field Summary
protected  Iterable<Renderable> renderables
           
 
Fields inherited from class gov.nasa.worldwindx.examples.lineofsight.LineIntersector
allIntersections, endTime, numPositions, numProcessedPositions, numThreads, positions, referencePoint, referencePosition, startTime, terrain, threadPool
 
Constructor Summary
ShapeLineIntersector(Terrain terrain, int numThreads)
           
 
Method Summary
protected  void doPerformIntersection(Position position)
          Called to execute an intersection test for one position.
 Iterable<Renderable> getRenderables()
           
 boolean hasRenderables()
          Indicates whether this intersector has renderables specified.
protected  List<Intersection> performRenderableIntersection(Line line, Renderable renderable)
           
 void setRenderables(Iterable<Renderable> renderables)
          Specifies the renderables to intersect with the line.
 
Methods inherited from class gov.nasa.worldwindx.examples.lineofsight.LineIntersector
getAllIntersections, getEndTime, getIntersections, getNumProcessedPositions, getNumThreads, getPositions, getReferencePosition, getStartTime, getTerrain, performIntersection, run, setPositions, setReferencePosition
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

renderables

protected Iterable<Renderable> renderables
Constructor Detail

ShapeLineIntersector

public ShapeLineIntersector(Terrain terrain,
                            int numThreads)
Method Detail

doPerformIntersection

protected void doPerformIntersection(Position position)
                              throws InterruptedException
Description copied from class: LineIntersector
Called to execute an intersection test for one position.

Specified by:
doPerformIntersection in class LineIntersector
Parameters:
position - the position to test.
Throws:
InterruptedException - if the operation is interrupted.s

getRenderables

public Iterable<Renderable> getRenderables()

hasRenderables

public boolean hasRenderables()
Indicates whether this intersector has renderables specified.

Returns:
true if this intersector has renderables, otherwise false.

performRenderableIntersection

protected List<Intersection> performRenderableIntersection(Line line,
                                                           Renderable renderable)
                                                    throws InterruptedException
Throws:
InterruptedException

setRenderables

public void setRenderables(Iterable<Renderable> renderables)
Specifies the renderables to intersect with the line.

Parameters:
renderables - the renderables to intersect.

NASA World Wind