Class LineConvexSubset3D
- java.lang.Object
-
- org.apache.commons.geometry.euclidean.threed.line.LineSubset3D
-
- org.apache.commons.geometry.euclidean.threed.line.LineConvexSubset3D
-
- All Implemented Interfaces:
Embedding<Vector3D,Vector1D>,RegionEmbedding<Vector3D,Vector1D>,Sized
- Direct Known Subclasses:
LineSpanningSubset3D,Ray3D,ReverseRay3D,Segment3D
public abstract class LineConvexSubset3D extends LineSubset3D
Class representing a convex subset of a line in 3D Euclidean space. Instances need not be finite, in which case the start or end point (or both) will be null.- See Also:
Lines3D
-
-
Constructor Summary
Constructors Constructor Description LineConvexSubset3D(Line3D line)Construct a new instance for the given line.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description booleancontains(Vector3D pt)Return true if the given point lies in the line subset.(package private) abstract booleancontainsAbscissa(double abscissa)Return true if the given abscissa value is contained in the line subset (ie, in the subspace region or one of its 1D boundaries).abstract Vector3DgetEndPoint()Get the end point for the line subset.IntervalgetInterval()Get the 1D interval for the line subset.abstract Vector3DgetStartPoint()Get the start point for the line subset.abstract doublegetSubspaceEnd()Get the 1D end location of the line subset orDouble.POSITIVE_INFINITYif no end location exists.IntervalgetSubspaceRegion()Get the subspace region for the instance.abstract doublegetSubspaceStart()Get the 1D start location of the line subset orDouble.NEGATIVE_INFINITYif no start location exists.abstract LineConvexSubset3Dtransform(Transform<Vector3D> transform)Transform this instance.-
Methods inherited from class org.apache.commons.geometry.euclidean.threed.line.LineSubset3D
getBounds, getCentroid, getLine, toSpace, toSubspace
-
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
-
-
-
-
Constructor Detail
-
LineConvexSubset3D
LineConvexSubset3D(Line3D line)
Construct a new instance for the given line.- Parameters:
line- line containing this convex subset
-
-
Method Detail
-
getStartPoint
public abstract Vector3D getStartPoint()
Get the start point for the line subset.- Returns:
- the start point for the line subset, or null if no start point exists
-
getSubspaceStart
public abstract double getSubspaceStart()
Get the 1D start location of the line subset orDouble.NEGATIVE_INFINITYif no start location exists.- Returns:
- the 1D start location of the line subset or
Double.NEGATIVE_INFINITYif no start location exists.
-
getEndPoint
public abstract Vector3D getEndPoint()
Get the end point for the line subset.- Returns:
- the end point for the line subset, or null if no end point exists.
-
getSubspaceEnd
public abstract double getSubspaceEnd()
Get the 1D end location of the line subset orDouble.POSITIVE_INFINITYif no end location exists.- Returns:
- the 1D end location of the line subset or
Double.POSITIVE_INFINITYif no end location exists
-
getSubspaceRegion
public Interval 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
-
getInterval
public Interval getInterval()
Get the 1D interval for the line subset. This method is an alias forgetSubspaceRegion().- Returns:
- the 1D interval for the line subset.
-
contains
public boolean contains(Vector3D pt)
Return true if the given point lies in the line subset.- Parameters:
pt- point to check- Returns:
- true if the point lies in the line subset
-
transform
public abstract LineConvexSubset3D transform(Transform<Vector3D> transform)
Transform this instance.- Parameters:
transform- the transform to apply- Returns:
- a new, transformed instance
-
containsAbscissa
abstract boolean containsAbscissa(double abscissa)
Return true if the given abscissa value is contained in the line subset (ie, in the subspace region or one of its 1D boundaries).- Parameters:
abscissa- abscissa to check- Returns:
- true if
abscissalies on the inside or boundary of the subspace region
-
-