47 laLine3(laPoint3 &a, laPoint3 &b){
56 origin = a; vector = b-a;
61 origin = a; vector = v;
68 inline double lenght()
const{
69 return vector.lenght();
74 return vector.lenght_sq();
82 inline laPoint3
end()
const{
return origin +
vector; };
85 inline void at(
double k, laPoint3 *ppt)
const{
86 *ppt = origin + vector*k;
90 inline laPoint3
at(
double k)
const{
91 return origin + vector*k;
laPoint3 intersection(laLine3 &l, double &pk1)
Find point of intersection (or nearest point) to another laLine3.
laPoint3 vector
Vector ( not normalized, so k = [0;1] traces the whole line segment )
laPoint3 end() const
Get endpoint.
void build_2pt(laPoint3 &a, laPoint3 &b)
Build from two end-points.
laPoint3 origin
Point of origin.
void draw(class laRenderer *r, laPoint3 pos)
Draw the line ( primarily for debug purposes )
void build_vec(laPoint3 &a, laPoint3 &v)
Build from an end-poind and vector.
double lenght_sq() const
Squared root of segment lenght.
void at(double k, laPoint3 *ppt) const
Get point at 1/k lenght (returns in user-specified pointer)
Virtual interface for the Engine graphics renderer.