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 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
    Indicator of inside leaf nodes found on the plus side.
    private boolean
    Indicator of inside leaf nodes found on the plus side.
    private final Region<S>
    Region on which to operate.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Simple constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Check if inside leaf nodes have been found on the minus side.
    boolean
    Check if inside leaf nodes have been found on the plus side.
    void
    Search recursively for inside leaf nodes on each side of the given hyperplane.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • region

      private final Region<S extends Space> region
      Region on which to operate.
    • plusFound

      private boolean plusFound
      Indicator of inside leaf nodes found on the plus side.
    • minusFound

      private boolean minusFound
      Indicator of inside leaf nodes found on the plus side.
  • Constructor Details

    • InsideFinder

      InsideFinder(Region<S> region)
      Simple constructor.
      Parameters:
      region - region on which to operate
  • Method Details

    • 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 node
      sub - 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