001/*
002 * Licensed to the Apache Software Foundation (ASF) under one or more
003 * contributor license agreements.  See the NOTICE file distributed with
004 * this work for additional information regarding copyright ownership.
005 * The ASF licenses this file to You under the Apache License, Version 2.0
006 * (the "License"); you may not use this file except in compliance with
007 * the License.  You may obtain a copy of the License at
008 *
009 *      http://www.apache.org/licenses/LICENSE-2.0
010 *
011 * Unless required by applicable law or agreed to in writing, software
012 * distributed under the License is distributed on an "AS IS" BASIS,
013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014 * See the License for the specific language governing permissions and
015 * limitations under the License.
016 */
017package org.apache.commons.geometry.core.partitioning.bsp;
018
019/** Enum describing the possible behaviors when cutting a region BSP tree node
020 * with a hyperplane to produce two new child nodes.
021 */
022public enum RegionCutRule {
023
024    /** Set the minus side of the cutting hyperplane as the inside of the region
025     * and the plus side as the outside. This is the default convention for hyperplanes.
026     */
027    MINUS_INSIDE,
028
029    /** Set the plus side of the cutting hyperplane as the inside of the region and
030     * the minus side as the outside.
031     */
032    PLUS_INSIDE,
033
034    /** Set both child nodes to the same location as the parent node. For example, if the
035     * parent node is marked as inside, both child nodes will be marked as inside. Similarly
036     * if the parent node is marked as outside, both child nodes will be marked as outside.
037     * This rule can be used to modify the tree structure (to perhaps produce a more efficient,
038     * balanced tree) without changing the represented region.
039     */
040    INHERIT
041}