Class AbstractEmbeddedRegionPlaneSubset

    • Field Detail

      • plane

        private final EmbeddingPlane plane
        The plane containing the embedded region.
    • Constructor Detail

      • AbstractEmbeddedRegionPlaneSubset

        AbstractEmbeddedRegionPlaneSubset​(EmbeddingPlane plane)
        Construct a new instance in the given plane.
        Parameters:
        plane - plane containing the subset
    • Method Detail

      • isFull

        public boolean isFull()
        Return true if this instance contains all points in the hyperplane.
        Specified by:
        isFull in interface HyperplaneSubset<Vector3D>
        Returns:
        true if this instance contains all points in the hyperplane
      • isEmpty

        public boolean isEmpty()
        Return true if this instance does not contain any points.
        Specified by:
        isEmpty in interface HyperplaneSubset<Vector3D>
        Returns:
        true if this instance does not contain any points
      • getSize

        public double getSize()
        Get the size of the instance.
        Specified by:
        getSize in interface Sized
        Returns:
        the size of the instance
      • getCentroid

        public Vector3D getCentroid()
        Get the centroid, or geometric center, of the hyperplane subset or null if no centroid exists or one exists but is not unique. A centroid will not exist for empty or infinite subsets.

        The centroid of a geometric object is defined as the mean position of all points in the object, including interior points, vertices, and other points lying on the boundary. If a physical object has a uniform density, then its center of mass is the same as its geometric centroid.

        Specified by:
        getCentroid in interface HyperplaneSubset<Vector3D>
        Returns:
        the centroid of the hyperplane subset or null if no unique centroid exists
        See Also:
        Centroid
      • classify

        public RegionLocation classify​(Vector3D pt)
        Classify a point with respect to the subset region. The point is classified as follows:
        • INSIDE - The point lies on the hyperplane and inside of the subset region.
        • BOUNDARY - The point lies on the hyperplane and is on the boundary of the subset region.
        • OUTSIDE - The point does not lie on the hyperplane or it does lie on the hyperplane but is outside of the subset region.
        Specified by:
        classify in interface HyperplaneSubset<Vector3D>
        Parameters:
        pt - the point to classify
        Returns:
        classification of the point with respect to the hyperplane and subspace region
      • closest

        public Vector3D closest​(Vector3D pt)
        Return the closest point to the argument that is contained in the subset (ie, not classified as outside), or null if no such point exists.
        Specified by:
        closest in interface HyperplaneSubset<Vector3D>
        Parameters:
        pt - the reference point
        Returns:
        the closest point to the reference point that is contained in the subset, or null if no such point exists
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • getBoundsFromSubspace

        protected Bounds3D getBoundsFromSubspace​(BoundarySource2D src)
        Compute 3D bounds from a subspace boundary source.
        Parameters:
        src - subspace boundary source
        Returns:
        3D bounds from the given embedded subspace boundary source or null if no valid bounds could be determined