Class LineSubset3D
java.lang.Object
org.apache.commons.geometry.euclidean.threed.line.LineSubset3D
- 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 Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract Bounds3D
Get the 3D bounding box of the line subset or null if the subset is empty or infinite.abstract Vector3D
Get the centroid, or geometric center, of the line subset or null if the subset is empty or infinite.getLine()
Get the line containing this subset.abstract HyperplaneBoundedRegion
<Vector1D> Get the subspace region for the instance.Transform a subspace point into a space point.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 Details
-
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
Get the line containing this subset.- Returns:
- the line containing this subset
-
toSpace
Transform a subspace point into a space point. -
toSubspace
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:
-
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
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
Get the subspace region for the instance.- Specified by:
getSubspaceRegion
in interfaceRegionEmbedding<Vector3D,
Vector1D> - Returns:
- the subspace region for the instance
-