Class InsideFinder<S extends Space>
java.lang.Object
org.apache.commons.math3.geometry.partitioning.InsideFinder<S>
- Type Parameters:
S- Type of the space.
Utility class checking if inside nodes can be found
on the plus and minus sides of an hyperplane.
- Since:
- 3.4
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanIndicator of inside leaf nodes found on the plus side.private booleanIndicator of inside leaf nodes found on the plus side.Region on which to operate. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanCheck if inside leaf nodes have been found on the minus side.booleanCheck if inside leaf nodes have been found on the plus side.voidrecurseSides(BSPTree<S> node, SubHyperplane<S> sub) Search recursively for inside leaf nodes on each side of the given hyperplane.
-
Field Details
-
region
Region on which to operate. -
plusFound
private boolean plusFoundIndicator of inside leaf nodes found on the plus side. -
minusFound
private boolean minusFoundIndicator of inside leaf nodes found on the plus side.
-
-
Constructor Details
-
InsideFinder
Simple constructor.- Parameters:
region- region on which to operate
-
-
Method Details
-
recurseSides
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
-