Class RegionBSPTree2D.BoundaryProjector2D
- 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<Vector2D,RegionBSPTree2D.RegionNode2D>
-
- org.apache.commons.geometry.euclidean.twod.RegionBSPTree2D.BoundaryProjector2D
-
- All Implemented Interfaces:
BSPTreeVisitor<Vector2D,RegionBSPTree2D.RegionNode2D>
- Enclosing class:
- RegionBSPTree2D
private static final class RegionBSPTree2D.BoundaryProjector2D extends AbstractRegionBSPTree.BoundaryProjector<Vector2D,RegionBSPTree2D.RegionNode2D>
Class used to project points onto the 2D 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 BoundaryProjector2D(Vector2D point)
Simple constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Vector2D
disambiguateClosestPoint(Vector2D target, Vector2D a, Vector2D b)
Method used to determine which of pointsa
andb
should be considered as the "closest" point totarget
when the points are exactly equidistant.-
Methods inherited from class org.apache.commons.geometry.core.partitioning.bsp.AbstractRegionBSPTree.BoundaryProjector
getProjected, isPossibleClosestCut, 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
-
BoundaryProjector2D
BoundaryProjector2D(Vector2D point)
Simple constructor.- Parameters:
point
- the point to project onto the region's boundary
-
-
Method Detail
-
disambiguateClosestPoint
protected Vector2D disambiguateClosestPoint(Vector2D target, Vector2D a, Vector2D 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<Vector2D,RegionBSPTree2D.RegionNode2D>
- 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
-
-