ClanLib
2.3.7
|
Math operations on 2D lines. More...
#include <line_math.h>
Static Public Member Functions | |
static CL_Pointf | closest_point (const CL_Pointf &P, const CL_Pointf &A, const CL_Pointf &B) |
Return the Point on the line from A to B closest to point P. More... | |
static float | closest_point_relative (const CL_Pointf &P, const CL_Pointf &A, const CL_Pointf &B) |
Return the relative position (0-1) of the point R on the line from A to B closest to point P. More... | |
static CL_Pointf | midpoint (const CL_Pointf &A, const CL_Pointf &B) |
Return the midpoint of the line from point A to point B. More... | |
static float | point_right_of_line (float x, float y, float *line) |
Return [<0, 0, >0] if the Point P is right, on or left of the line trough A,B. More... | |
static float | point_right_of_line (float x, float y, float line_x1, float line_y1, float line_x2, float line_y2) |
Point right of line. More... | |
static float | point_right_of_line (const CL_Pointf &A, const CL_Pointf &B, const CL_Pointf &P) |
Point right of line. More... | |
Math operations on 2D lines.
Obsolete - Use CL_Line, CL_LineRay, CL_LineSegment
|
static |
Return the Point on the line from A to B closest to point P.
P | point P |
A | point A |
B | point B |
|
static |
Return the relative position (0-1) of the point R on the line from A to B closest to point P.
P | point P |
A | point A |
B | point B |
Return the midpoint of the line from point A to point B.
Also See CL_LineSegment
A | = point A |
B | = point B |
|
static |
Return [<0, 0, >0] if the Point P is right, on or left of the line trough A,B.
Also See CL_Line and CL_LineSegment
x | = x coordinate of the point being tested. |
y | = y coordinate of the point being tested. |
line | = The line. A pointer to a float array with the elements {x1,y1,x2,y2}. |
|
static |
Point right of line.
x | = value |
y | = value |
line_x1 | = value |
line_y1 | = value |
line_x2 | = value |
line_y2 | = value |
|
static |
Point right of line.
A | = Pointf |
B | = Pointf |
P | = Pointf |