Class InsideFinder<S extends Space>

  • 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.
      • Methods inherited from class java.lang.Object

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

      • 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 Detail

      • InsideFinder

        InsideFinder​(Region<S> region)
        Simple constructor.
        Parameters:
        region - region on which to operate
    • 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 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