5 #ifndef __IRR_LINE_3D_H_INCLUDED__ 6 #define __IRR_LINE_3D_H_INCLUDED__ 26 line3d(T xa, T ya, T za, T xb, T yb, T zb) :
start(xa, ya, za),
end(xb, yb, zb) {}
45 void setLine(
const T& xa,
const T& ya,
const T& za,
const T& xb,
const T& yb,
const T& zb)
46 {
start.set(xa, ya, za);
end.set(xb, yb, zb);}
93 T d = (T)
v.getLength();
95 T
t =
v.dotProduct(
c);
118 T d = sradius * sradius - (
c*
c -
v*
v);
bool operator==(const line3d< T > &other) const
T getLengthSQ() const
Get squared length of line.
line3d()
Default constructor.
line3d< T > & operator-=(const vector3d< T > &point)
vector3d< T > getClosestPoint(const vector3d< T > &point) const
Get the closest point on this line to a point.
line3d(T xa, T ya, T za, T xb, T yb, T zb)
Constructor with two points.
GLdouble GLdouble GLdouble GLdouble q
void setLine(const T &xa, const T &ya, const T &za, const T &xb, const T &yb, const T &zb)
Set this line to a new line going through the two points.
line3d< T > operator-(const vector3d< T > &point) const
REALINLINE f32 squareroot(const f32 f)
bool operator!=(const line3d< T > &other) const
Everything in the Irrlicht Engine can be found in this namespace.
3d vector template class with lots of operators and methods.
3D line between two points with intersection methods.
bool isPointBetweenStartAndEnd(const vector3d< T > &point) const
Check if the given point is between start and end of the line.
double f64
64 bit floating point variable.
vector3d< T > getVector() const
Get vector of line.
vector3d< T > end
End point of line.
line3d(const vector3d< T > &start, const vector3d< T > &end)
Constructor with two points as vectors.
line3d< T > operator+(const vector3d< T > &point) const
vector3d< T > getMiddle() const
Get middle of line.
line3d< s32 > line3di
Typedef for an integer line.
void setLine(const line3d< T > &line)
Set this line to new line given as parameter.
bool getIntersectionWithSphere(const vector3d< T > &sorigin, T sradius, f64 &outdistance) const
Check if the line intersects with a sphere.
vector3d< T > start
Start point of line.
bool isBetweenPoints(const vector3d< T > &begin, const vector3d< T > &end) const
Returns if this vector interpreted as a point is on a line between two other points.
line3d< T > & operator+=(const vector3d< T > &point)
T getLength() const
Get length of line.
void setLine(const vector3d< T > &nstart, const vector3d< T > &nend)
Set this line to a new line going through the two points.
line3d< f32 > line3df
Typedef for an f32 line.