|
| line2d () |
| Default constructor for line going from (0,0) to (1,1). More...
|
|
| line2d (T xa, T ya, T xb, T yb) |
| Constructor for line between the two points. More...
|
|
| line2d (const vector2d< T > &start, const vector2d< T > &end) |
| Constructor for line between the two points given as vectors. More...
|
|
| line2d (const line2d< T > &other) |
| Copy constructor. More...
|
|
line2d< T > | operator+ (const vector2d< T > &point) const |
|
line2d< T > & | operator+= (const vector2d< T > &point) |
|
line2d< T > | operator- (const vector2d< T > &point) const |
|
line2d< T > & | operator-= (const vector2d< T > &point) |
|
bool | operator== (const line2d< T > &other) const |
|
bool | operator!= (const line2d< T > &other) const |
|
void | setLine (const T &xa, const T &ya, const T &xb, const T &yb) |
| Set this line to new line going through the two points. More...
|
|
void | setLine (const vector2d< T > &nstart, const vector2d< T > &nend) |
| Set this line to new line going through the two points. More...
|
|
void | setLine (const line2d< T > &line) |
| Set this line to new line given as parameter. More...
|
|
T | getLength () const |
| Get length of line. More...
|
|
T | getLengthSQ () const |
| Get squared length of the line. More...
|
|
vector2d< T > | getMiddle () const |
| Get middle of the line. More...
|
|
vector2d< T > | getVector () const |
| Get the vector of the line. More...
|
|
bool | intersectAsSegments (const line2d< T > &other) const |
|
bool | incidentSegments (const line2d< T > &other) const |
|
bool | nearlyParallel (const line2d< T > &line, const T factor=relativeErrorFactor< T >()) const |
|
vector2d< T > | fastLinesIntersection (const line2d< T > &l) const |
|
bool | lineIntersectSegment (const line2d< T > &segment, vector2d< T > &out) const |
|
bool | intersectWith (const line2d< T > &l, vector2d< T > &out, bool checkOnlySegments=true, bool ignoreCoincidentLines=false) const |
| Tests if this line intersects with another line. More...
|
|
vector2d< T > | getUnitVector () const |
| Get unit vector of the line. More...
|
|
double | getAngleWith (const line2d< T > &l) const |
| Get angle between this line and given line. More...
|
|
T | getPointOrientation (const vector2d< T > &point) const |
| Tells us if the given point lies to the left, right, or on the line. More...
|
|
bool | isPointOnLine (const vector2d< T > &point) const |
| Check if the given point is a member of the line. More...
|
|
bool | isPointBetweenStartAndEnd (const vector2d< T > &point) const |
| Check if the given point is between start and end of the line. More...
|
|
vector2d< T > | getClosestPoint (const vector2d< T > &point, bool checkOnlySegments=true) const |
| Get the closest point on this line to a point. More...
|
|
vector2df | getClosestPoint (const vector2df &point, bool checkOnlySegments) const |
|
template<class T>
class saga::core::line2d< T >
2D line between two points with intersection methods.
Definition at line 17 of file line2d.h.