| 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.
|
Point |
LineSegment.intersection(Line line)
A method that computes and returns the Point intersection of 'this' line segment and
the line specified in the parameter.
|
Point |
LineSegment.intersection(LineSegment lineSegment)
A method that computes and returns the Point of of intersection of 'this' line
segment and the line segment specified in the parameter.
|
Point |
LineSegment.midpoint()
Method to compute the midpoint of 'this' line segment
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
LineSegment.pointIsOnLineSegment(Point p)
This method is called to find if the specified Point lies on 'this' line segment.
|
boolean |
Line.pointIsOnTheLine(Point p)
This method is called to find if the specified Point lies on 'this' line.
|
void |
LineSegment.setP1(Point p1)
Setter to change the first endpoint
|
void |
LineSegment.setP2(Point p2)
Setter to change the first endpoint
|
void |
Line.updateLine(Point p1,
Point p2)
This method accepts two
Points specifying a line
segment on the line. |
| 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.
|