Class ShapeLineIntersector
- java.lang.Object
-
- gov.nasa.worldwindx.examples.lineofsight.LineIntersector
-
- gov.nasa.worldwindx.examples.lineofsight.ShapeLineIntersector
-
- All Implemented Interfaces:
java.lang.Runnable
public class ShapeLineIntersector extends LineIntersector
Computes the intersections of a collection of lines with collection ofRenderable
s. 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. SeeLineIntersector.setReferencePosition(gov.nasa.worldwind.geom.Position)
andsetRenderables(Iterable)
.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class gov.nasa.worldwindx.examples.lineofsight.LineIntersector
LineIntersector.InternalIntersector
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.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
Constructors Constructor Description ShapeLineIntersector(Terrain terrain, int numThreads)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
doPerformIntersection(Position position)
Called to execute an intersection test for one position.java.lang.Iterable<Renderable>
getRenderables()
boolean
hasRenderables()
Indicates whether this intersector has renderables specified.protected java.util.List<Intersection>
performRenderableIntersection(Line line, Renderable renderable)
void
setRenderables(java.lang.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
-
-
-
-
Field Detail
-
renderables
protected java.lang.Iterable<Renderable> renderables
-
-
Constructor Detail
-
ShapeLineIntersector
public ShapeLineIntersector(Terrain terrain, int numThreads)
-
-
Method Detail
-
getRenderables
public java.lang.Iterable<Renderable> getRenderables()
-
setRenderables
public void setRenderables(java.lang.Iterable<Renderable> renderables)
Specifies the renderables to intersect with the line.- Parameters:
renderables
- the renderables to intersect.
-
hasRenderables
public boolean hasRenderables()
Indicates whether this intersector has renderables specified.- Returns:
- true if this intersector has renderables, otherwise false.
-
doPerformIntersection
protected void doPerformIntersection(Position position) throws java.lang.InterruptedException
Description copied from class:LineIntersector
Called to execute an intersection test for one position.- Specified by:
doPerformIntersection
in classLineIntersector
- Parameters:
position
- the position to test.- Throws:
java.lang.InterruptedException
- if the operation is interrupted.s
-
performRenderableIntersection
protected java.util.List<Intersection> performRenderableIntersection(Line line, Renderable renderable) throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
-
-