|
static bool | intersects (const Line &line1, const Line &line2, Point *intersection=nullptr) |
|
|
Point | pt [2] |
| the line consists of two points
|
|
◆ distTo()
float Geometry2d::Line::distTo |
( |
Point |
other | ) |
const |
returns the shortest distance between the line and a point
- Parameters
-
other | the point to find the distance to |
- Returns
- the distance to the point from the line
◆ intersects()
bool Geometry2d::Line::intersects |
( |
const Line & |
other, |
|
|
Point * |
intersection = nullptr |
|
) |
| const |
Test for line intersections.
If the two lines intersect, then the function returns true, else false. Also, if the lines intersect, then intr is set to the intersection point.
- Parameters
-
other | the line to test for intersection with |
intr | set to the intersection point if the lines intersect |
- Returns
- true if the lines intersect, false otherwise
◆ pointSide()
float Geometry2d::Line::pointSide |
( |
const Point & |
p | ) |
const |
|
inline |
tells you which side of the line you are on
- Returns
- the sine of the non-zero portion of the cross product
◆ transform()
Applies a transformation matrix to the line.
- Parameters
-
t | the transformation matrix to perform on the line |
The documentation for this class was generated from the following files:
- common/Geometry2d/Line.hpp
- common/Geometry2d/Line.cpp