java.lang.Object
org.apache.commons.geometry.euclidean.threed.line.LineSubset3D
All Implemented Interfaces:
Embedding<Vector3D,Vector1D>, RegionEmbedding<Vector3D,Vector1D>, Sized
Direct Known Subclasses:
EmbeddedTreeLineSubset3D, LineConvexSubset3D

public abstract class LineSubset3D extends Object implements RegionEmbedding<Vector3D,Vector1D>, Sized
Class representing a subset of a line in 3D Euclidean space. For example, line segments, rays, and disjoint combinations of the two are line subsets. Line subsets may be finite or infinite.
  • Field Details

    • line

      private final Line3D line
      The line containing this instance.
  • Constructor Details

    • LineSubset3D

      LineSubset3D(Line3D line)
      Construct a new instance based on the given line.
      Parameters:
      line - line containing the instance
  • Method Details

    • getLine

      public Line3D getLine()
      Get the line containing this subset.
      Returns:
      the line containing this subset
    • toSpace

      public Vector3D toSpace(Vector1D pt)
      Transform a subspace point into a space point.
      Specified by:
      toSpace in interface Embedding<Vector3D,Vector1D>
      Parameters:
      pt - lower-dimension point of the subspace
      Returns:
      n-dimension point of the space corresponding to the specified subspace point
      See Also:
    • toSubspace

      public Vector1D toSubspace(Vector3D pt)
      Transform a space point into a subspace point.
      Specified by:
      toSubspace in interface Embedding<Vector3D,Vector1D>
      Parameters:
      pt - n-dimension point of the space
      Returns:
      lower-dimension point of the subspace corresponding to the specified space point
      See Also:
    • getCentroid

      public abstract Vector3D getCentroid()
      Get the centroid, or geometric center, of the line subset or null if the subset is empty or infinite.
      Returns:
      the centroid of the line subset, or null if the subset is empty or infinite
    • getBounds

      public abstract Bounds3D getBounds()
      Get the 3D bounding box of the line subset or null if the subset is empty or infinite.
      Returns:
      the 3D bounding box the line subset or null if the subset is empty or infinite
    • getSubspaceRegion

      public abstract HyperplaneBoundedRegion<Vector1D> getSubspaceRegion()
      Get the subspace region for the instance.
      Specified by:
      getSubspaceRegion in interface RegionEmbedding<Vector3D,Vector1D>
      Returns:
      the subspace region for the instance