Class LineSubset3D
- 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 java.lang.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.
-
-
Constructor Summary
Constructors Constructor Description LineSubset3D(Line3D line)
Construct a new instance based on the given line.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract Bounds3D
getBounds()
Get the 3D bounding box of the line subset or null if the subset is empty or infinite.abstract Vector3D
getCentroid()
Get the centroid, or geometric center, of the line subset or null if the subset is empty or infinite.Line3D
getLine()
Get the line containing this subset.abstract HyperplaneBoundedRegion<Vector1D>
getSubspaceRegion()
Get the subspace region for the instance.Vector3D
toSpace(Vector1D pt)
Transform a subspace point into a space point.Vector1D
toSubspace(Vector3D pt)
Transform a space point into a subspace point.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.commons.geometry.core.Embedding
toSpace, toSubspace
-
Methods inherited from interface org.apache.commons.geometry.core.Sized
getSize, isFinite, isInfinite
-
-
-
-
Field Detail
-
line
private final Line3D line
The line containing this instance.
-
-
Constructor Detail
-
LineSubset3D
LineSubset3D(Line3D line)
Construct a new instance based on the given line.- Parameters:
line
- line containing the instance
-
-
Method Detail
-
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 interfaceEmbedding<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:
Embedding.toSubspace(Point)
-
toSubspace
public Vector1D toSubspace(Vector3D pt)
Transform a space point into a subspace point.- Specified by:
toSubspace
in interfaceEmbedding<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:
Embedding.toSpace(S)
-
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 interfaceRegionEmbedding<Vector3D,Vector1D>
- Returns:
- the subspace region for the instance
-
-