Class RegionCutBoundary<P extends Point<P>>

java.lang.Object
org.apache.commons.geometry.core.partitioning.bsp.RegionCutBoundary<P>
Type Parameters:
P - Point implementation type
All Implemented Interfaces:
Sized

public final class RegionCutBoundary<P extends Point<P>> extends Object implements Sized
Class representing the portion of an AbstractRegionNode's cut that lies on the boundary of the region. Portions of the node cut may be oriented so that the plus side of the cut points toward the outside of the region (getOutsideFacing()) and other portions toward the inside of the region (getInsideFacing()). The inside-facing and outside-facing portions of the region boundary are represented as lists of disjoint hyperplane convex subsets, all originating from the same hyperplane convex subset forming the node cut.
  • Method Details

    • getInsideFacing

      Get the portion of the cut with its plus side facing the inside of the region.
      Returns:
      the portion of the cut with its plus side facing the inside of the region
    • getOutsideFacing

      Get the portion of the cut with its plus side facing the outside of the region.
      Returns:
      the portion of the cut with its plus side facing the outside of the region
    • getSize

      public double getSize()
      Get the total size of the cut boundary, including inside and outside facing components.
      Specified by:
      getSize in interface Sized
      Returns:
      the total size of the cut boundary, including inside and outside facing components
    • closest

      public P closest(P pt)
      Return the closest point to the argument in the inside and outside facing portions of the cut boundary.
      Parameters:
      pt - the reference point
      Returns:
      the point in the cut boundary closest to the reference point
      See Also:
    • contains

      public boolean contains(P pt)
      Return true if the given point is contained in the boundary, in either the inside facing portion or the outside facing portion.
      Parameters:
      pt - point to test
      Returns:
      true if the point is contained in the boundary
      See Also:
    • containsInsideFacing

      public boolean containsInsideFacing(P pt)
      Return true if the given point is contained in the inside-facing portion of the region boundary.
      Parameters:
      pt - point to test
      Returns:
      true if the point is contained in the inside-facing portion of the region boundary
    • containsOutsideFacing

      public boolean containsOutsideFacing(P pt)
      Return true if the given point is contained in the outside-facing portion of the region boundary.
      Parameters:
      pt - point to test
      Returns:
      true if the point is contained in the outside-facing portion of the region boundary