/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.commons.math3.geometry.partitioning; import org.apache.commons.math3.geometry.Space; /** This interface is used to visit {@link BSPTree BSP tree} nodes. *
Navigation through {@link BSPTree BSP trees} can be done using * two different point of views:
*Before attempting to visit an internal node, this method is * called to determine the desired ordering of the visit. It is * guaranteed that this method will be called before {@link * #visitInternalNode visitInternalNode} for a given node, it will be * called exactly once for each internal node.
* @param node BSP node guaranteed to have a non null cut sub-hyperplane * @return desired visit order, must be one of * {@link Order#PLUS_MINUS_SUB}, {@link Order#PLUS_SUB_MINUS}, * {@link Order#MINUS_PLUS_SUB}, {@link Order#MINUS_SUB_PLUS}, * {@link Order#SUB_PLUS_MINUS}, {@link Order#SUB_MINUS_PLUS} */ Order visitOrder(BSPTreeIt is guaranteed that this method will be called after {@link * #visitOrder visitOrder} has been called for a given node, * it wil be called exactly once for each internal node.
* @param node BSP node guaranteed to have a non null cut sub-hyperplane * @see #visitLeafNode */ void visitInternalNode(BSPTree