P - Point implementation typeN - BSP tree node implementation typeprotected static class AbstractRegionBSPTree.BoundaryProjector<P extends Point<P>,N extends AbstractRegionBSPTree.AbstractRegionNode<P,N>> extends BSPTreeVisitor.ClosestFirstVisitor<P,N>
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 and Description |
|---|
BoundaryProjector(P point)
Simple constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected P |
disambiguateClosestPoint(P target,
P a,
P b)
Method used to determine which of points
a and b should be considered
as the "closest" point to target when the points are exactly equidistant. |
P |
getProjected()
Get the projected point on the region's boundary, or null if no point could be found.
|
protected boolean |
isPossibleClosestCut(HyperplaneSubset<P> cut,
P target,
double currentMinDist)
Return true if the given node cut is a possible candidate for containing the closest region
boundary point to the target.
|
BSPTreeVisitor.Result |
visit(N node)
Visit a node in a BSP tree.
|
visitOrdergetTargetpublic BoundaryProjector(P point)
point - the point to project onto the region's boundarypublic BSPTreeVisitor.Result visit(N node)
node - the node being visitedprotected boolean isPossibleClosestCut(HyperplaneSubset<P> cut, P target, double currentMinDist)
cut - the node cut to testtarget - the target point being projectedcurrentMinDist - the smallest distance found so far to a region boundary; this value is guaranteed
to be non-negativeprotected P disambiguateClosestPoint(P target, P a, P b)
a and b should be considered
as the "closest" point to target when the points are exactly equidistant.target - the target pointa - first point to considerb - second point to considera or b should be considered as the one closest to
targetpublic P getProjected()
Copyright © 2016–2021 The Apache Software Foundation. All rights reserved.