#include <ddggeom.h>
Public Members | |||
ddgLine2 ( ddgVector2 *p1, ddgVector2 *p2 ) | |||
Constructor using 2 points. | |||
void | set ( ddgVector2 *p1, ddgVector2 *p2 ) | ||
Constructor using 2 points. | |||
ddgLine2 (void) | |||
Default constructor. | |||
ddgVector2 | o (void) | ||
Return the orthogonal slope vector. Equivalent of 2D normal. | |||
bool | solve ( ddgVector2 *v, int dim) | ||
Given X, or Y, find the other. Return ddgFailure if unsolvable. | |||
bool | intersect ( ddgLine2 *l, ddgVector2 *pt) | ||
Calculate the intersection point of this line with another. | |||
float | isPointLeftOfLine ( ddgVector2 *q) | ||
Returns [-1,1], positive if point is left of line, negative if right, 0 if on. | |||
ddgVector2 | p | ||
A point on the line. | |||
ddgVector2 | d | ||
Slope vector of the line. |