public final class Segment extends LineConvexSubset
Instances of this class are guaranteed to be immutable.
Lines
,
Line SegmentModifier 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 |
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() |
Segment |
reverse() |
String |
toString() |
Segment |
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 false
.
public boolean isFinite()
This method always returns true
.
public double getSize()
public Vector2D getCentroid()
public Vector2D getStartPoint()
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()
getEndPoint
in class LineConvexSubset
public double getSubspaceEnd()
Double.POSITIVE_INFINITY
if
no end location exists.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.getBounds
in class LineSubset
public Segment transform(Transform<Vector2D> transform)
transform
in interface HyperplaneConvexSubset<Vector2D>
transform
in interface HyperplaneSubset<Vector2D>
transform
in class LineConvexSubset
public Segment reverse()
reverse
in interface HyperplaneConvexSubset<Vector2D>
reverse
in class LineConvexSubset
Copyright © 2016–2021 The Apache Software Foundation. All rights reserved.