This reference page is linked to from the following overview topics: Math and Geometry Utilities.
#include <math.h>
Public Types |
|
enum | IntersectionResult { PARALLEL, COINCIDENT, NOT_INTERSECTING, INTERSECTING } |
Possible return values of computing intersection of 2 lines. More... |
|
Public Member Functions |
|
Line (const Vector &vStart, const Vector &vEnd) | |
Constructor, based on start and end points.
|
|
float | RangeFrom (const Vector &vPoint) |
Returns the shortest distance between a
given point and this line. |
|
IntersectionResult | Intersection2D (const Line &cOther, Vector &vResult, bool bSegmentOnly=false) |
Calculates intersection of 2 lines in 2D. If
bSegmentOnly is true it will only. |
enum IntersectionResult |
Possible return values of computing intersection of 2 lines.
Definition at line 1495 of file math.h.
{ PARALLEL, COINCIDENT, NOT_INTERSECTING, INTERSECTING }; IntersectionResult Intersection2D( const Line& cOther, Vector &vResult, bool bSegmentOnly = false ); };
float RangeFrom | ( | const Vector & | vPoint | ) |
Returns the shortest distance between a given point and this line.
Note: The line is not logically extended to infinity in this function. Only points between the start and end point are considered part of the line.
IntersectionResult Intersection2D | ( | const Line & | cOther, |
Vector & | vResult, | ||
bool | bSegmentOnly =
false |
||
) |
Calculates intersection of 2 lines in 2D. If bSegmentOnly is true it will only.
result the intersection point if it is between the segment endpoints, otherwise the result apply to whole lines.