Math::line Class Reference
#include <line.h>
Detailed Description
A line in 3d space.(C) 2004 RadonLabs GmbH
Public Member Functions | |
line () | |
default constructor | |
line (const point &startPoint, const point &endPoint) | |
component constructor | |
line (const line &rhs) | |
copy constructor | |
void | set (const point &startPoint, const point &endPoint) |
set start and end point | |
const point & | start () const |
get start point | |
point | end () const |
get end point | |
const vector & | vec () const |
get vector | |
scalar | length () const |
get length | |
scalar | lengthsq () const |
get squared length | |
scalar | distance (const point &p) const |
minimal distance of point to line | |
bool | intersect (const line &l, point &pa, point &pb) const |
intersect with line | |
scalar | closestpoint (const point &p) const |
return t of the closest point on the line | |
point | pointat (scalar t) const |
return p = b + m*t |
Member Function Documentation
scalar Math::line::closestpoint | ( | const point & | p | ) | const [inline] |
point Math::line::pointat | ( | scalar | t | ) | const [inline] |