Class DefaultCutPlaneVisitor
- java.lang.Object
-
- org.noise_planet.noisemodelling.pathfinder.DefaultCutPlaneVisitor
-
- All Implemented Interfaces:
CutPlaneVisitor
,CutPlaneVisitorFactory
public class DefaultCutPlaneVisitor extends Object implements CutPlaneVisitor, CutPlaneVisitorFactory
Way to store data computed by threads. Multiple threads use one instance. This class must be thread safe Store only vertical cut planes- Author:
- Nicolas Fortin, Pierre Aumond
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.noise_planet.noisemodelling.pathfinder.CutPlaneVisitor
CutPlaneVisitor.PathSearchStrategy
-
-
Field Summary
Fields Modifier and Type Field Description ConcurrentLinkedDeque<CutProfile>
cutProfiles
This list is thread safe so can be used in a multi-thread environmentScene
inputData
boolean
keepCutPlanes
AtomicLong
pathCount
-
Constructor Summary
Constructors Constructor Description DefaultCutPlaneVisitor(boolean keepCutPlanes)
DefaultCutPlaneVisitor(boolean keepCutPlanes, Scene inputData)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
finalizeReceiver(PathFinder.ReceiverPointInfo receiver)
No more propagation paths will be pushed for this receiver identifierCollection<CutProfile>
getCutProfiles()
Scene
getInputData()
CutPlaneVisitor.PathSearchStrategy
onNewCutPlane(CutProfile cutProfile)
A new vertical profile between a receiver and a source has been foundvoid
startReceiver(PathFinder.ReceiverPointInfo receiver, Collection<PathFinder.SourcePointInfo> sourceList, AtomicInteger cutProfileCount)
Called before looking for vertical cut planes between the receiver and the sources.CutPlaneVisitor
subProcess(org.h2gis.api.ProgressVisitor visitor)
-
-
-
Field Detail
-
cutProfiles
public ConcurrentLinkedDeque<CutProfile> cutProfiles
This list is thread safe so can be used in a multi-thread environment
-
inputData
public Scene inputData
-
keepCutPlanes
public boolean keepCutPlanes
-
pathCount
public AtomicLong pathCount
-
-
Constructor Detail
-
DefaultCutPlaneVisitor
public DefaultCutPlaneVisitor(boolean keepCutPlanes, Scene inputData)
-
DefaultCutPlaneVisitor
public DefaultCutPlaneVisitor(boolean keepCutPlanes)
-
-
Method Detail
-
finalizeReceiver
public void finalizeReceiver(PathFinder.ReceiverPointInfo receiver)
No more propagation paths will be pushed for this receiver identifier- Specified by:
finalizeReceiver
in interfaceCutPlaneVisitor
- Parameters:
receiver
-
-
getInputData
public Scene getInputData()
-
onNewCutPlane
public CutPlaneVisitor.PathSearchStrategy onNewCutPlane(CutProfile cutProfile)
Description copied from interface:CutPlaneVisitor
A new vertical profile between a receiver and a source has been found- Specified by:
onNewCutPlane
in interfaceCutPlaneVisitor
- Parameters:
cutProfile
- vertical profile- Returns:
- Will skip or not the next processing depending on this value.
-
startReceiver
public void startReceiver(PathFinder.ReceiverPointInfo receiver, Collection<PathFinder.SourcePointInfo> sourceList, AtomicInteger cutProfileCount)
Description copied from interface:CutPlaneVisitor
Called before looking for vertical cut planes between the receiver and the sources.- Specified by:
startReceiver
in interfaceCutPlaneVisitor
- Parameters:
receiver
- Receiver informationsourceList
- All sources in the range of this receiver sorted by the distance from the receiver
-
subProcess
public CutPlaneVisitor subProcess(org.h2gis.api.ProgressVisitor visitor)
- Specified by:
subProcess
in interfaceCutPlaneVisitorFactory
- Parameters:
visitor
- Progression information, used to cancel processing too- Returns:
- an instance of the interface IComputePathsOut
-
getCutProfiles
public Collection<CutProfile> getCutProfiles()
-
-