Data structure for the representation of a 2D straight line. More...
#include <Structs.h>
Public Member Functions | |
StraightLine2d () | |
StraightLine2d (const Vec2d &point1, const Vec2d &point2) | |
StraightLine2d (float angle, float c) | |
StraightLine2d (const PointPair2d &pointPair) | |
Public Attributes | |
float | c |
The negative scalar product of normalVector and point. | |
Vec2d | directionVector |
The normalized direction vector of the straight line. | |
Vec2d | normalVector |
The normalized normal vector of the straight line. | |
Vec2d | point |
An aribtrary point belonging to the straight line. |
Data structure for the representation of a 2D straight line.
The function PrimitivesDrawer::DrawLine draws a straight line, given its specification in this struct. Other functions (e.g. detectors) can use this struct as well.
The two independent straight line equations are:
1. .
2.
where any satisfying one of these equations belongs to the straight line, = point, = directionVector, and = normalVector.
StraightLine2d::StraightLine2d | ( | ) | [inline] |
StraightLine2d::StraightLine2d | ( | const Vec2d & | point1, |
const Vec2d & | point2 | ||
) | [inline] |
StraightLine2d::StraightLine2d | ( | float | angle, |
float | c | ||
) | [inline] |
StraightLine2d::StraightLine2d | ( | const PointPair2d & | pointPair | ) | [inline] |
float StraightLine2d::c |