public abstract class LineIntersector
extends java.lang.Object
implements java.lang.Runnable
setReferencePosition(gov.nasa.worldwind.geom.Position)
) and a list of end positions (see setPositions(Iterable)
).Modifier and Type | Class and Description |
---|---|
protected class |
LineIntersector.InternalIntersector |
Modifier and Type | Field and Description |
---|---|
protected java.util.Map<Position,java.util.List<Intersection>> |
allIntersections |
protected long |
endTime |
protected int |
numPositions |
protected java.util.concurrent.atomic.AtomicInteger |
numProcessedPositions |
protected int |
numThreads |
protected java.lang.Iterable<Position> |
positions |
protected Vec4 |
referencePoint |
protected Position |
referencePosition |
protected long |
startTime |
protected Terrain |
terrain |
protected java.util.concurrent.ThreadPoolExecutor |
threadPool |
Modifier | Constructor and Description |
---|---|
protected |
LineIntersector(Terrain terrain,
int numThreads) |
Modifier and Type | Method and Description |
---|---|
protected abstract void |
doPerformIntersection(Position position)
Called to execute an intersection test for one position.
|
java.util.Map<Position,java.util.List<Intersection>> |
getAllIntersections() |
long |
getEndTime() |
java.util.List<Intersection> |
getIntersections(Position position) |
int |
getNumProcessedPositions() |
int |
getNumThreads() |
java.lang.Iterable<Position> |
getPositions() |
Position |
getReferencePosition() |
long |
getStartTime() |
Terrain |
getTerrain() |
protected void |
performIntersection(Position position) |
void |
run() |
void |
setPositions(java.lang.Iterable<Position> positions)
Specifies the end positions of all lines to intersect.
|
void |
setReferencePosition(Position referencePosition)
Sets the origin of the lines to intersect.
|
protected java.util.Map<Position,java.util.List<Intersection>> allIntersections
protected long endTime
protected int numPositions
protected java.util.concurrent.atomic.AtomicInteger numProcessedPositions
protected int numThreads
protected java.lang.Iterable<Position> positions
protected Vec4 referencePoint
protected Position referencePosition
protected long startTime
protected Terrain terrain
protected java.util.concurrent.ThreadPoolExecutor threadPool
protected LineIntersector(Terrain terrain, int numThreads)
protected abstract void doPerformIntersection(Position position) throws java.lang.InterruptedException
position
- the position to test.java.lang.InterruptedException
- if the operation is interrupted.spublic java.util.Map<Position,java.util.List<Intersection>> getAllIntersections()
public long getEndTime()
public java.util.List<Intersection> getIntersections(Position position)
public int getNumProcessedPositions()
public int getNumThreads()
public java.lang.Iterable<Position> getPositions()
public Position getReferencePosition()
public long getStartTime()
public Terrain getTerrain()
protected void performIntersection(Position position) throws java.lang.InterruptedException
java.lang.InterruptedException
public void run()
run
in interface java.lang.Runnable
public void setPositions(java.lang.Iterable<Position> positions)
positions
- the positions.public void setReferencePosition(Position referencePosition)
referencePosition
- the origin to use for all lines.