Class InsideFinder<S extends Space>
- java.lang.Object
-
- org.apache.commons.math3.geometry.partitioning.InsideFinder<S>
-
- Type Parameters:
S
- Type of the space.
class InsideFinder<S extends Space> extends java.lang.Object
Utility class checking if inside nodes can be found on the plus and minus sides of an hyperplane.- Since:
- 3.4
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
minusFound
Indicator of inside leaf nodes found on the plus side.private boolean
plusFound
Indicator of inside leaf nodes found on the plus side.private Region<S>
region
Region on which to operate.
-
Constructor Summary
Constructors Constructor Description InsideFinder(Region<S> region)
Simple constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
minusFound()
Check if inside leaf nodes have been found on the minus side.boolean
plusFound()
Check if inside leaf nodes have been found on the plus side.void
recurseSides(BSPTree<S> node, SubHyperplane<S> sub)
Search recursively for inside leaf nodes on each side of the given hyperplane.
-
-
-
Method Detail
-
recurseSides
public void recurseSides(BSPTree<S> node, SubHyperplane<S> sub)
Search recursively for inside leaf nodes on each side of the given hyperplane.The algorithm used here is directly derived from the one described in section III (Binary Partitioning of a BSP Tree) of the Bruce Naylor, John Amanatides and William Thibault paper Merging BSP Trees Yields Polyhedral Set Operations Proc. Siggraph '90, Computer Graphics 24(4), August 1990, pp 115-124, published by the Association for Computing Machinery (ACM)..
- Parameters:
node
- current BSP tree nodesub
- sub-hyperplane
-
plusFound
public boolean plusFound()
Check if inside leaf nodes have been found on the plus side.- Returns:
- true if inside leaf nodes have been found on the plus side
-
minusFound
public boolean minusFound()
Check if inside leaf nodes have been found on the minus side.- Returns:
- true if inside leaf nodes have been found on the minus side
-
-