#include <grid.hh>
Public Member Functions | |
| Line () | |
| Create a line. | |
| Line (Point a, Point b) | |
| Create a line. | |
| Line (float x1, float y1, float x2, float y2) | |
| Create a line. | |
| Line (const LineRT &line) | |
| Create a line by converting from the polar representation (rho, theta). | |
| Point | normal () const |
| Compute the normal of the line. | |
| Point | tangent () const |
| Compute the tangent of the line. | |
| Point | intersection (const Line &line) const |
Compute the intersection with line. | |
| Line & | cut (const Line &line1, const Line &line2) |
| Cut the line between two lines. | |
| Line | get_cut (const Line &line1, const Line &line2) const |
| Compute the cut of the line between two lines. | |
| Point | closest (const Point &point) const |
Compute the point on the line that is closest to point. | |
| Point | mirror (const Point &point) const |
| Mirror a point with respect to the line. | |
| Line & | mirror (const Line &mirror) |
| Mirror the line with respect to the given line. | |
| Line | get_mirror (const Line &mirror) const |
| Return the line mirrored with respect to the given line. | |
Public Attributes | |
| Point | a |
| The first end point. | |
| Point | b |
| The second end point. | |
|
||||||||||||
|
Create a line.
|
|
||||||||||||||||||||
|
Create a line.
|
|
|
Create a line by converting from the polar representation (rho, theta).
|
|
|
Compute the point on the line that is closest to
|
|
||||||||||||
|
Cut the line between two lines.
|
|
||||||||||||
|
Compute the cut of the line between two lines.
|
|
|
Return the line mirrored with respect to the given line.
|
|
|
Compute the intersection with
|
|
|
Mirror the line with respect to the given line.
|
|
|
Mirror a point with respect to the line.
|
|
|
Compute the normal of the line. Note that the length of the normal is not normalized to one.
|
|
|
Compute the tangent of the line. Note that the length of the tangent is not normalized to one.
|
1.3.4