Class AbstractRegionBSPTree.UnionOperator<P extends Point<P>,N extends AbstractRegionBSPTree.AbstractRegionNode<P,N>>

Type Parameters:
P - Point implementation type
N - BSP tree node implementation type
Enclosing class:
AbstractRegionBSPTree<P extends Point<P>,N extends AbstractRegionBSPTree.AbstractRegionNode<P,N>>

private static final class AbstractRegionBSPTree.UnionOperator<P extends Point<P>,N extends AbstractRegionBSPTree.AbstractRegionNode<P,N>> extends AbstractRegionBSPTree.RegionMergeOperator<P,N>
Class for performing boolean union operations on region trees.
  • Constructor Details

    • UnionOperator

      private UnionOperator()
  • Method Details

    • mergeLeaf

      protected N mergeLeaf(N node1, N node2)
      Merge a leaf node from one input with a subtree from another.

      When this method is called, one or both of the given nodes will be a leaf node. This method is expected to return a node representing the merger of the two given nodes. The way that the returned node is determined defines the overall behavior of the merge operation.

      The return value can be one of the two input nodes or a completely different one.

      Specified by:
      mergeLeaf in class AbstractBSPTreeMergeOperator<P extends Point<P>,N extends AbstractRegionBSPTree.AbstractRegionNode<P,N>>
      Parameters:
      node1 - node from the first input tree
      node2 - node from the second input tree
      Returns:
      node representing the merger of the two input nodes