public final class Ray extends LineConvexSubset
Instances of this class are guaranteed to be immutable.
ReverseRay
,
Lines
Modifier and Type | Method and Description |
---|---|
Bounds2D |
getBounds()
Get a
Bounds2D object defining an axis-aligned bounding box containing all
vertices for this subset. |
Vector2D |
getCentroid() |
Vector2D |
getDirection()
Get the direction of the ray.
|
Vector2D |
getEndPoint()
Get the end point for the subset.
|
double |
getSize() |
Vector2D |
getStartPoint()
Get the start point for the subset.
|
double |
getSubspaceEnd()
Get the 1D end location of the subset or
Double.POSITIVE_INFINITY if
no end location exists. |
double |
getSubspaceStart()
Get the 1D start location of the subset or
Double.NEGATIVE_INFINITY if
no start location exists. |
boolean |
isFinite() |
boolean |
isFull() |
boolean |
isInfinite() |
ReverseRay |
reverse() |
String |
toString() |
Ray |
transform(Transform<Vector2D> transform) |
closest, getInterval, getSubspaceRegion, isEmpty, split, toConvex
classify, getHyperplane, getLine, getPrecision, intersection, intersection, toSpace, toSubspace
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
classify, contains, getHyperplane
toSpace, toSubspace
public boolean isFull()
This method always returns false
.
public boolean isInfinite()
This method always returns true
.
public boolean isFinite()
This method always returns false
.
public double getSize()
This method always returns Double.POSITIVE_INFINITY
.
public Vector2D getCentroid()
This method always returns null
.
public Vector2D getStartPoint()
LineConvexSubset
getStartPoint
in class LineConvexSubset
public double getSubspaceStart()
Double.NEGATIVE_INFINITY
if
no start location exists.getSubspaceStart
in class LineConvexSubset
Double.NEGATIVE_INFINITY
if
no start location exists.public Vector2D getEndPoint()
This method always returns null
.
getEndPoint
in class LineConvexSubset
public double getSubspaceEnd()
Double.POSITIVE_INFINITY
if
no end location exists.
This method always returns Double.POSITIVE_INFINITY
.
getSubspaceEnd
in class LineConvexSubset
Double.POSITIVE_INFINITY
if
no end location existspublic Bounds2D getBounds()
Bounds2D
object 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
.
getBounds
in class LineSubset
public Vector2D getDirection()
ray.getLine().getDirection()
.public Ray transform(Transform<Vector2D> transform)
transform
in interface HyperplaneConvexSubset<Vector2D>
transform
in interface HyperplaneSubset<Vector2D>
transform
in class LineConvexSubset
public ReverseRay reverse()
reverse
in interface HyperplaneConvexSubset<Vector2D>
reverse
in class LineConvexSubset
Copyright © 2016–2021 The Apache Software Foundation. All rights reserved.