Class ReverseRay3D
java.lang.Object
org.apache.commons.geometry.euclidean.threed.line.LineSubset3D
org.apache.commons.geometry.euclidean.threed.line.LineConvexSubset3D
org.apache.commons.geometry.euclidean.threed.line.ReverseRay3D
Class representing a portion of a line in 3D Euclidean space that starts at infinity and
continues in the direction of the line up to a single end point. This is equivalent to taking a
Ray3D and reversing the line direction.
Instances of this class are guaranteed to be immutable.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final doubleThe abscissa of the line subset endpoint. -
Constructor Summary
ConstructorsConstructorDescriptionReverseRay3D(Line3D line, double end) Construct a new instance from the given line and 1D end location.ReverseRay3D(Line3D line, Vector3D endPoint) Construct a new instance from the given line and end point. -
Method Summary
Modifier and TypeMethodDescription(package private) 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).Get 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.Get the end point for the line subset.doublegetSize()Get the size of the instance.Get the start point for the line subset.doubleGet the 1D end location of the line subset orDouble.POSITIVE_INFINITYif no end location exists.doubleGet the 1D start location of the line subset orDouble.NEGATIVE_INFINITYif no start location exists.booleanisFinite()Return true if the size of the instance is finite.booleanReturn true if the size of the instance is infinite.toString()Transform this instance.Methods inherited from class LineConvexSubset3D
contains, getInterval, getSubspaceRegionMethods 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, toSubspace
-
Field Details
-
end
private final double endThe abscissa of the line subset endpoint.
-
-
Constructor Details
-
ReverseRay3D
-
ReverseRay3D
ReverseRay3D(Line3D line, double end) Construct a new instance from the given line and 1D end location. No validation is performed.- Parameters:
line- line for the instanceend- end location for the instance
-
-
Method Details
-
isInfinite
public boolean isInfinite()Return true if the size of the instance is infinite.This method always returns
true.- Returns:
- true if the size of the instance is infinite
-
isFinite
public boolean isFinite()Return true if the size of the instance is finite.This method always returns
false.- Returns:
- true if the size of the instance is finite
-
getSize
public double getSize()Get the size of the instance.This method always returns
Double.POSITIVE_INFINITY.- Returns:
- the size of the instance
-
getStartPoint
Get the start point for the line subset.This method always returns
null.- Specified by:
getStartPointin classLineConvexSubset3D- Returns:
- the start point for the line subset, or null if no start point exists
-
getSubspaceStart
public double getSubspaceStart()Get the 1D start location of the line subset orDouble.NEGATIVE_INFINITYif no start location exists.This method always returns
Double.NEGATIVE_INFINITY.- Specified by:
getSubspaceStartin classLineConvexSubset3D- Returns:
- the 1D start location of the line subset or
Double.NEGATIVE_INFINITYif no start location exists.
-
getEndPoint
Get the end point for the line subset.- Specified by:
getEndPointin classLineConvexSubset3D- Returns:
- the end point for the line subset, or null if no end point exists.
-
getSubspaceEnd
public double getSubspaceEnd()Get the 1D end location of the line subset orDouble.POSITIVE_INFINITYif no end location exists.- Specified by:
getSubspaceEndin classLineConvexSubset3D- Returns:
- the 1D end location of the line subset or
Double.POSITIVE_INFINITYif no end location exists
-
getCentroid
Get the centroid, or geometric center, of the line subset or null if the subset is empty or infinite.This method always returns
null.- 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.This method always returns
null.- 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.- Specified by:
transformin classLineConvexSubset3D- Parameters:
transform- the transform to apply- Returns:
- a new, transformed instance
-
toString
-
containsAbscissa
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).- Specified by:
containsAbscissain classLineConvexSubset3D- Parameters:
abscissa- abscissa to check- Returns:
- true if
abscissalies on the inside or boundary of the subspace region
-