Class RegionBSPTree1D.RegionNode1D
- java.lang.Object
-
- org.apache.commons.geometry.core.partitioning.bsp.AbstractBSPTree.AbstractNode<P,N>
-
- org.apache.commons.geometry.core.partitioning.bsp.AbstractRegionBSPTree.AbstractRegionNode<Vector1D,RegionBSPTree1D.RegionNode1D>
-
- org.apache.commons.geometry.euclidean.oned.RegionBSPTree1D.RegionNode1D
-
- All Implemented Interfaces:
BSPSubtree<Vector1D,RegionBSPTree1D.RegionNode1D>
,BSPTree.Node<Vector1D,RegionBSPTree1D.RegionNode1D>
- Enclosing class:
- RegionBSPTree1D
public static final class RegionBSPTree1D.RegionNode1D extends AbstractRegionBSPTree.AbstractRegionNode<Vector1D,RegionBSPTree1D.RegionNode1D>
BSP tree node for one dimensional Euclidean space.
-
-
Constructor Summary
Constructors Modifier Constructor Description private
RegionNode1D(AbstractBSPTree<Vector1D,RegionBSPTree1D.RegionNode1D> tree)
Simple constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Interval
getNodeRegion()
Get the region represented by this node.protected RegionBSPTree1D.RegionNode1D
getSelf()
Get a reference to the current instance, cast to type N.private void
visitNodeInterval(java.util.function.BiConsumer<? super OrientedPoint,? super OrientedPoint> visitor)
Determine the min/max boundaries for the convex region represented by this node and pass the values to the visitor function.-
Methods inherited from class org.apache.commons.geometry.core.partitioning.bsp.AbstractRegionBSPTree.AbstractRegionNode
clearCut, cut, cut, getCutBoundary, getLocation, getTree, insertCut, insertCut, isInside, isOutside, nodeInvalidated, setLocation, setLocationValue, toString
-
Methods inherited from class org.apache.commons.geometry.core.partitioning.bsp.AbstractBSPTree.AbstractNode
accept, checkValid, count, depth, getCut, getCutHyperplane, getMinus, getParent, getPlus, height, isInternal, isLeaf, isMinus, isPlus, makeRoot, nodes, setSubtree, trim
-
-
-
-
Constructor Detail
-
RegionNode1D
private RegionNode1D(AbstractBSPTree<Vector1D,RegionBSPTree1D.RegionNode1D> tree)
Simple constructor.- Parameters:
tree
- the owning tree instance
-
-
Method Detail
-
getNodeRegion
public Interval getNodeRegion()
Get the region represented by this node. The returned region contains the entire area contained in this node, regardless of the attributes of any child nodes.- Returns:
- the region represented by this node
-
visitNodeInterval
private void visitNodeInterval(java.util.function.BiConsumer<? super OrientedPoint,? super OrientedPoint> visitor)
Determine the min/max boundaries for the convex region represented by this node and pass the values to the visitor function.- Parameters:
visitor
- the object that will receive the min and max boundaries for the node's convex region
-
getSelf
protected RegionBSPTree1D.RegionNode1D getSelf()
Get a reference to the current instance, cast to type N.- Specified by:
getSelf
in classAbstractBSPTree.AbstractNode<Vector1D,RegionBSPTree1D.RegionNode1D>
- Returns:
- a reference to the current instance, as type N.
-
-