gov.nasa.worldwindx.examples.lineofsight
Class ShapeLineIntersector
java.lang.Object
gov.nasa.worldwindx.examples.lineofsight.LineIntersector
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).
| Fields inherited from class gov.nasa.worldwindx.examples.lineofsight.LineIntersector |
allIntersections, endTime, numPositions, numProcessedPositions, numThreads, positions, referencePoint, referencePosition, startTime, terrain, threadPool |
| 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 |
renderables
protected Iterable<Renderable> renderables
ShapeLineIntersector
public ShapeLineIntersector(Terrain terrain,
int numThreads)
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.