public abstract class LineIntersector extends Object implements 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 Map<Position,List<Intersection>> |
allIntersections |
protected long |
endTime |
protected int |
numPositions |
protected AtomicInteger |
numProcessedPositions |
protected int |
numThreads |
protected Iterable<Position> |
positions |
protected Vec4 |
referencePoint |
protected Position |
referencePosition |
protected long |
startTime |
protected Terrain |
terrain |
protected 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.
|
Map<Position,List<Intersection>> |
getAllIntersections() |
long |
getEndTime() |
List<Intersection> |
getIntersections(Position position) |
int |
getNumProcessedPositions() |
int |
getNumThreads() |
Iterable<Position> |
getPositions() |
Position |
getReferencePosition() |
long |
getStartTime() |
Terrain |
getTerrain() |
protected void |
performIntersection(Position position) |
void |
run() |
void |
setPositions(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 Map<Position,List<Intersection>> allIntersections
protected long endTime
protected int numPositions
protected AtomicInteger numProcessedPositions
protected int numThreads
protected Vec4 referencePoint
protected Position referencePosition
protected long startTime
protected Terrain terrain
protected ThreadPoolExecutor threadPool
protected LineIntersector(Terrain terrain, int numThreads)
protected abstract void doPerformIntersection(Position position) throws InterruptedException
position
- the position to test.InterruptedException
- if the operation is interrupted.spublic Map<Position,List<Intersection>> getAllIntersections()
public long getEndTime()
public List<Intersection> getIntersections(Position position)
public int getNumProcessedPositions()
public int getNumThreads()
public Position getReferencePosition()
public long getStartTime()
public Terrain getTerrain()
protected void performIntersection(Position position) throws InterruptedException
InterruptedException
public void setPositions(Iterable<Position> positions)
positions
- the positions.public void setReferencePosition(Position referencePosition)
referencePosition
- the origin to use for all lines.