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 RegionBSPTree1DThe 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.doublegetSize()Get the size of the instance.Get the subspace region for the instance.toConvex()Return a list ofLineConvexSubset3Dinstances representing the same region as this instance.toString()Transform this instance.Methods inherited from class LineSubset3D
getLine, toSpace, toSubspaceMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface Embedding
toSpace, toSubspaceMethods inherited from interface 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. Iffullis 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:
getSubspaceRegionin interfaceRegionEmbedding<Vector3D,Vector1D> - Specified by:
getSubspaceRegionin 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:
getCentroidin 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:
getBoundsin 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 ofLineConvexSubset3Dinstances representing the same region as this instance.- Returns:
- a list of
LineConvexSubset3Dinstances representing the same region as this instance.
-
toString
-