JNR
|
3D line segment More...
#include <laLine3.h>
Public Member Functions | |
laLine3 (laPoint3 &a, laPoint3 &b) | |
laPoint3 | intersection (laLine3 &l, double &pk1) |
Find point of intersection (or nearest point) to another laLine3. More... | |
laPoint3 | intersection (class laPlane3 &pn, double *pk=NULL) |
Find point of intersection with laPlane3. | |
void | draw (class laRenderer *r, laPoint3 pos) |
Draw the line ( primarily for debug purposes ) | |
Line constructors and initialization methods | |
void | build_2pt (laPoint3 &a, laPoint3 &b) |
Build from two end-points. | |
void | build_vec (laPoint3 &a, laPoint3 &v) |
Build from an end-poind and vector. | |
Lenght of the segment | |
double | lenght () const |
double | lenght_sq () const |
Squared root of segment lenght. | |
Getting points at different positions on the line | |
laPoint3 | end () const |
Get endpoint. | |
void | at (double k, laPoint3 *ppt) const |
Get point at 1/k lenght (returns in user-specified pointer) More... | |
laPoint3 | at (double k) const |
Public Attributes | |
laPoint3 | origin |
Point of origin. | |
laPoint3 | vector |
Vector ( not normalized, so k = [0;1] traces the whole line segment ) | |
|
inline |
Get point at 1/k lenght (returns in user-specified pointer)
Get point at 1/k lenght (retruns a new object)
Definition at line 85 of file laLine3.h.
Referenced by intersection().
laPoint3 laLine3::intersection | ( | laLine3 & | l, |
double & | pk1 | ||
) |
Find point of intersection (or nearest point) to another laLine3.
= is not a good idea for double vars
Definition at line 48 of file laLine3.cpp.