Class ReverseRay
java.lang.Object
org.apache.commons.geometry.euclidean.twod.LineSubset
org.apache.commons.geometry.euclidean.twod.LineConvexSubset
org.apache.commons.geometry.euclidean.twod.ReverseRay
- All Implemented Interfaces:
Embedding<Vector2D,Vector1D>, HyperplaneConvexSubset<Vector2D>, HyperplaneSubset<Vector2D>, Splittable<Vector2D, HyperplaneSubset<Vector2D>>, RegionEmbedding<Vector2D, Vector1D>, Sized
Class representing a portion of a line in 2D 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
Ray and reversing the line direction.
Instances of this class are guaranteed to be immutable.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionGet aBounds2Dobject defining an axis-aligned bounding box containing all vertices for this subset.Get the centroid, or geometric center, of the hyperplane subset or null if no centroid exists or one exists but is not unique.Get the end point for the subset.doublegetSize()Get the size of the instance.Get the start point for the subset.doubleGet the 1D end location of the subset orDouble.POSITIVE_INFINITYif no end location exists.doubleGet the 1D start location of the subset orDouble.NEGATIVE_INFINITYif no start location exists.booleanisFinite()Return true if the size of the instance is finite.booleanisFull()Return true if this instance contains all points in the hyperplane.booleanReturn true if the size of the instance is infinite.reverse()Reverse the orientation of the hyperplane for this instance, returning the result as a new instance.protected Split<LineConvexSubset> splitOnIntersection(Line splitter, Vector2D intersection) toString()Return a new hyperplane subset resulting from the application of the given transform.Methods inherited from class LineConvexSubset
closest, getInterval, getSubspaceRegion, isEmpty, split, toConvexMethods inherited from class LineSubset
classify, getHyperplane, getLine, getPrecision, intersection, intersection, 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 HyperplaneSubset
classify, contains, getHyperplane
-
Method Details
-
isFull
Return true if this instance contains all points in the hyperplane.This method always returns
false.- Returns:
- true if this instance contains all points in the hyperplane
-
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
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
Get the size of the instance.This method always returns
Double.POSITIVE_INFINITY.- Returns:
- the size of the instance
-
getCentroid
Get the centroid, or geometric center, of the hyperplane subset or null if no centroid exists or one exists but is not unique. A centroid will not exist for empty or infinite subsets.The centroid of a geometric object is defined as the mean position of all points in the object, including interior points, vertices, and other points lying on the boundary. If a physical object has a uniform density, then its center of mass is the same as its geometric centroid.
This method always returns
null.- Returns:
- the centroid of the hyperplane subset or null if no unique centroid exists
- See Also:
-
getStartPoint
Get the start point for the subset.This method always returns
null.- Specified by:
getStartPointin classLineConvexSubset- Returns:
- the start point for the subset, or null if no start point exists
-
getSubspaceStart
Get the 1D start location of the subset orDouble.NEGATIVE_INFINITYif no start location exists.This method always returns
Double.NEGATIVE_INFINITY.- Specified by:
getSubspaceStartin classLineConvexSubset- Returns:
- the 1D start location of the subset or
Double.NEGATIVE_INFINITYif no start location exists.
-
getEndPoint
Get the end point for the subset.- Specified by:
getEndPointin classLineConvexSubset- Returns:
- the end point for the subset, or null if no end point exists.
-
getSubspaceEnd
Get the 1D end location of the subset orDouble.POSITIVE_INFINITYif no end location exists.- Specified by:
getSubspaceEndin classLineConvexSubset- Returns:
- the 1D end location of the subset or
Double.POSITIVE_INFINITYif no end location exists
-
getBounds
Get aBounds2Dobject defining an axis-aligned bounding box containing all vertices for this subset. Null is returned if the subset is infinite or does not contain any vertices.This method always returns
null.- Specified by:
getBoundsin classLineSubset- Returns:
- the bounding box for this instance or null if no valid bounds could be determined
-
transform
Return a new hyperplane subset resulting from the application of the given transform. The current instance is not modified.- Specified by:
transformin interfaceHyperplaneConvexSubset<Vector2D>- Specified by:
transformin interfaceHyperplaneSubset<Vector2D>- Specified by:
transformin classLineConvexSubset- Parameters:
transform- the transform instance to apply- Returns:
- new transformed hyperplane subset
-
reverse
Reverse the orientation of the hyperplane for this instance, returning the result as a new instance. The returned subset contains the same points but has a reversed orientation.- Specified by:
reversein interfaceHyperplaneConvexSubset<Vector2D>- Specified by:
reversein classLineConvexSubset- Returns:
- a hyperplane convex subset representing the same region but with the opposite orientation.
-
toString
-
splitOnIntersection
-