Class AbstractRegionBSPTree.XorOperator<P extends Point<P>,N extends AbstractRegionBSPTree.AbstractRegionNode<P,N>>
- java.lang.Object
-
- org.apache.commons.geometry.core.partitioning.bsp.AbstractBSPTreeMergeOperator<P,N>
-
- org.apache.commons.geometry.core.partitioning.bsp.AbstractRegionBSPTree.RegionMergeOperator<P,N>
-
- org.apache.commons.geometry.core.partitioning.bsp.AbstractRegionBSPTree.XorOperator<P,N>
-
- Type Parameters:
P
- Point implementation typeN
- BSP tree node implementation type
- Enclosing class:
- AbstractRegionBSPTree<P extends Point<P>,N extends AbstractRegionBSPTree.AbstractRegionNode<P,N>>
private static final class AbstractRegionBSPTree.XorOperator<P extends Point<P>,N extends AbstractRegionBSPTree.AbstractRegionNode<P,N>> extends AbstractRegionBSPTree.RegionMergeOperator<P,N>
Class for performing boolean symmetric difference (xor) operations on region trees.
-
-
Constructor Summary
Constructors Modifier Constructor Description private
XorOperator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected N
mergeLeaf(N node1, N node2)
Merge a leaf node from one input with a subtree from another.-
Methods inherited from class org.apache.commons.geometry.core.partitioning.bsp.AbstractRegionBSPTree.RegionMergeOperator
apply
-
Methods inherited from class org.apache.commons.geometry.core.partitioning.bsp.AbstractBSPTreeMergeOperator
getOutputTree, outputNode, outputSubtree, performMerge, setOutputTree
-
-
-
-
Method Detail
-
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 classAbstractBSPTreeMergeOperator<P extends Point<P>,N extends AbstractRegionBSPTree.AbstractRegionNode<P,N>>
- Parameters:
node1
- node from the first input treenode2
- node from the second input tree- Returns:
- node representing the merger of the two input nodes
-
-