public final class Segment extends LineConvexSubset
Instances of this class are guaranteed to be immutable.
Lines,
Line Segment| 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 |
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, toConvexclassify, getHyperplane, getLine, getPrecision, intersection, intersection, toSpace, toSubspaceclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitclassify, contains, getHyperplanetoSpace, toSubspacepublic 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 LineConvexSubsetpublic double getSubspaceStart()
Double.NEGATIVE_INFINITY if
no start location exists.getSubspaceStart in class LineConvexSubsetDouble.NEGATIVE_INFINITY if
no start location exists.public Vector2D getEndPoint()
getEndPoint in class LineConvexSubsetpublic double getSubspaceEnd()
Double.POSITIVE_INFINITY if
no end location exists.getSubspaceEnd in class LineConvexSubsetDouble.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 LineSubsetpublic Segment transform(Transform<Vector2D> transform)
transform in interface HyperplaneConvexSubset<Vector2D>transform in interface HyperplaneSubset<Vector2D>transform in class LineConvexSubsetpublic Segment reverse()
reverse in interface HyperplaneConvexSubset<Vector2D>reverse in class LineConvexSubsetCopyright © 2016–2021 The Apache Software Foundation. All rights reserved.