Class EmbeddedTreeLineSubset3D
java.lang.Object
org.apache.commons.geometry.euclidean.threed.line.LineSubset3D
org.apache.commons.geometry.euclidean.threed.line.EmbeddedTreeLineSubset3D
Class representing an arbitrary subset of a line in 3D Euclidean space using a
RegionBSPTree1D
. This class can represent convex, non-convex, finite,
infinite, and empty regions.
This class is mutable and not thread safe.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final RegionBSPTree1D
The 1D region representing the area on the line. -
Constructor Summary
ConstructorsConstructorDescriptionConstruct a new, empty subset for the given line.EmbeddedTreeLineSubset3D
(Line3D line, boolean full) Construct a new subset for the given line.EmbeddedTreeLineSubset3D
(Line3D line, RegionBSPTree1D region) Construct a new instance from its defining line and subspace region. -
Method Summary
Modifier and TypeMethodDescriptionGet the 3D bounding box of the line subset or null if the subset is empty or infinite.Get the centroid, or geometric center, of the line subset or null if the subset is empty or infinite.double
getSize()
Get the size of the instance.Get the subspace region for the instance.toConvex()
Return a list ofLineConvexSubset3D
instances representing the same region as this instance.toString()
Transform this instance.Methods inherited from class org.apache.commons.geometry.euclidean.threed.line.LineSubset3D
getLine, toSpace, toSubspace
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, 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
isFinite, isInfinite
-
Field Details
-
region
The 1D region representing the area on the line.
-
-
Constructor Details
-
EmbeddedTreeLineSubset3D
Construct a new, empty subset for the given line.- Parameters:
line
- line defining the subset
-
EmbeddedTreeLineSubset3D
Construct a new subset for the given line. Iffull
is true, then the subset will cover the entire line; otherwise, it will be empty.- Parameters:
line
- line defining the subsetfull
- if true, the subset will cover the entire space; otherwise it will be empty
-
EmbeddedTreeLineSubset3D
Construct a new instance from its defining line and subspace region.- Parameters:
line
- line defining the subsetregion
- subspace region for the subset
-
-
Method Details
-
getSize
public double getSize()Get the size of the instance.- Returns:
- the size of the instance
-
getSubspaceRegion
Get the subspace region for the instance.- Specified by:
getSubspaceRegion
in interfaceRegionEmbedding<Vector3D,
Vector1D> - Specified by:
getSubspaceRegion
in classLineSubset3D
- Returns:
- the subspace region for the instance
-
getCentroid
Get the centroid, or geometric center, of the line subset or null if the subset is empty or infinite.- Specified by:
getCentroid
in classLineSubset3D
- 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.- Specified by:
getBounds
in classLineSubset3D
- Returns:
- the 3D bounding box the line subset or null if the subset is empty or infinite
-
transform
Transform this instance.- Parameters:
transform
- the transform to apply- Returns:
- a new, transformed instance
-
toConvex
Return a list ofLineConvexSubset3D
instances representing the same region as this instance.- Returns:
- a list of
LineConvexSubset3D
instances representing the same region as this instance.
-
toString
-