public class LineSegment extends Object
Modifier and Type | Field and Description |
---|---|
private Vector |
endPoint
End vector of the segment.
|
private Vector |
startPoint
Start vector of the segment.
|
Constructor and Description |
---|
LineSegment(Vector startPoint,
Vector endPoint)
Creates a new line segment.
|
Modifier and Type | Method and Description |
---|---|
Rectangle2D.Float |
getBoundingRectange()
Computes the bounding rectangle for this line segment.
|
Vector |
getEndPoint() |
float |
getLength() |
Vector |
getStartPoint() |
LineSegment |
transformBy(Matrix m)
Transforms the segment by the specified matrix
|
private final Vector startPoint
public LineSegment(Vector startPoint, Vector endPoint)
startPoint
- the start point of a line segment.endPoint
- the end point of a line segment.public Vector getStartPoint()
public Vector getEndPoint()
public float getLength()
public Rectangle2D.Float getBoundingRectange()
public LineSegment transformBy(Matrix m)
m
- the matrix for the transformationWebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses