74 m(endPoint - startPoint)
97 this->
m = endPoint - startPoint;
106 this->
b = startPoint;
125 return this->
b + this->
m;
191 diff = diff - this->
m * t;
210 return this->
b + this->
m * t;
A line in 3d space.
Definition line.h:22
line()
default constructor
Definition line.h:63
scalar length() const
get length
Definition line.h:141
scalar distance(const point &p) const
minimal distance of point to line
Definition line.h:184
point end() const
get end point
Definition line.h:123
bool intersect(const line &l, point &pa, point &pb) const
intersect with line
Definition line.cc:20
const vector & vec() const
get vector
Definition line.h:132
void set(const point &startPoint, const point &endPoint)
set start and end point
Definition line.h:94
scalar lengthsq() const
get squared length
Definition line.h:150
point b
Definition line.h:55
scalar closestpoint(const point &p) const
return t of the closest point on the line
Definition line.h:165
void set_point_dir(const point &startPoint, const vector &direction)
set start point and direction
Definition line.h:104
const point & start() const
get start point
Definition line.h:114
point pointat(scalar t) const
return p = b + m*t
Definition line.h:208
vector m
Definition line.h:56
Different curves.
Definition angularpfeedbackloop.h:17
__forceinline scalar length(const quat &q)
Definition quat.h:259
__forceinline scalar lengthsq(const quat &q)
Definition quat.h:268
__forceinline scalar dot(const plane &p, const vec4 &v1)
Definition plane.h:246
float scalar
Definition scalar.h:45
Nebula's scalar datatype.
Represents a 3D point in space.
Definition point.h:22
A vector is a 3D direction in space.
Definition vector.h:22