| Modifier and Type | Field and Description |
|---|---|
private Point |
LineSegment.p1
Point representing the first endpoint for the line segment
|
private Point |
LineSegment.p2
Point representing the second endpoint for the line segment
|
| Modifier and Type | Method and Description |
|---|---|
Point |
LineSegment.getP1()
Getter for the first endpoint
|
Point |
LineSegment.getP2()
Getter for the second endpoint
|
Point |
Line.intersection(Line line)
A method that computes and returns the Point intersection of 'this' line and
the line specified in the parameter.
|
| Modifier and Type | Method and Description |
|---|---|
void |
LineSegment.setP1(Point p1)
Setter to change the first endpoint
|
void |
LineSegment.setP2(Point p2)
Setter to change the first endpoint
|
| Constructor and Description |
|---|
Line(Point p1,
Point p2)
Constructor that accepts two
Points specifying a line
segment on the line. |
LineSegment(Point p1,
Point p2)
Constructor that accepts the two endpoints of the line segment.
|