Class RegionBSPTree1S.BoundaryProjector1S
- java.lang.Object
-
- org.apache.commons.geometry.core.partitioning.bsp.BSPTreeVisitor.TargetPointVisitor<P,N>
-
- org.apache.commons.geometry.core.partitioning.bsp.BSPTreeVisitor.ClosestFirstVisitor<P,N>
-
- org.apache.commons.geometry.core.partitioning.bsp.AbstractRegionBSPTree.BoundaryProjector<Point1S,RegionBSPTree1S.RegionNode1S>
-
- org.apache.commons.geometry.spherical.oned.RegionBSPTree1S.BoundaryProjector1S
-
- All Implemented Interfaces:
BSPTreeVisitor<Point1S,RegionBSPTree1S.RegionNode1S>
- Enclosing class:
- RegionBSPTree1S
private static final class RegionBSPTree1S.BoundaryProjector1S extends AbstractRegionBSPTree.BoundaryProjector<Point1S,RegionBSPTree1S.RegionNode1S>
Class used to project points onto the region boundary.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.commons.geometry.core.partitioning.bsp.BSPTreeVisitor
BSPTreeVisitor.ClosestFirstVisitor<P extends Point<P>,N extends BSPTree.Node<P,N>>, BSPTreeVisitor.FarthestFirstVisitor<P extends Point<P>,N extends BSPTree.Node<P,N>>, BSPTreeVisitor.Order, BSPTreeVisitor.Result, BSPTreeVisitor.TargetPointVisitor<P extends Point<P>,N extends BSPTree.Node<P,N>>
-
-
Constructor Summary
Constructors Constructor Description BoundaryProjector1S(Point1S point)
Simple constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Point1S
disambiguateClosestPoint(Point1S target, Point1S a, Point1S b)
Method used to determine which of pointsa
andb
should be considered as the "closest" point totarget
when the points are exactly equidistant.protected boolean
isPossibleClosestCut(HyperplaneSubset<Point1S> cut, Point1S target, double minDist)
Return true if the given node cut is a possible candidate for containing the closest region boundary point to the target.-
Methods inherited from class org.apache.commons.geometry.core.partitioning.bsp.AbstractRegionBSPTree.BoundaryProjector
getProjected, visit
-
Methods inherited from class org.apache.commons.geometry.core.partitioning.bsp.BSPTreeVisitor.ClosestFirstVisitor
visitOrder
-
Methods inherited from class org.apache.commons.geometry.core.partitioning.bsp.BSPTreeVisitor.TargetPointVisitor
getTarget
-
-
-
-
Constructor Detail
-
BoundaryProjector1S
BoundaryProjector1S(Point1S point)
Simple constructor.- Parameters:
point
- the point to project onto the region's boundary
-
-
Method Detail
-
isPossibleClosestCut
protected boolean isPossibleClosestCut(HyperplaneSubset<Point1S> cut, Point1S target, double minDist)
Return true if the given node cut is a possible candidate for containing the closest region boundary point to the target.- Overrides:
isPossibleClosestCut
in classAbstractRegionBSPTree.BoundaryProjector<Point1S,RegionBSPTree1S.RegionNode1S>
- Parameters:
cut
- the node cut to testtarget
- the target point being projectedminDist
- the smallest distance found so far to a region boundary; this value is guaranteed to be non-negative- Returns:
- true if the cut is a possible candidate for containing the closest region boundary point to the target
-
disambiguateClosestPoint
protected Point1S disambiguateClosestPoint(Point1S target, Point1S a, Point1S b)
Method used to determine which of pointsa
andb
should be considered as the "closest" point totarget
when the points are exactly equidistant.- Overrides:
disambiguateClosestPoint
in classAbstractRegionBSPTree.BoundaryProjector<Point1S,RegionBSPTree1S.RegionNode1S>
- Parameters:
target
- the target pointa
- first point to considerb
- second point to consider- Returns:
- which of
a
orb
should be considered as the one closest totarget
-
-