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) {}
93 T d = (
T)v.getLength();
95 T t = v.dotProduct(c);
Axis aligned bounding box in 3d dimensional space.
3D line between two points with intersection methods.
line3d< T > operator-(const vector3d< T > &point) const
bool getIntersectionWithSphere(vector3d< T > sorigin, T sradius, f64 &outdistance) const
Check if the line intersects with a shpere.
line3d(T xa, T ya, T za, T xb, T yb, T zb)
Constructor with two points.
T getLengthSQ() const
Get squared length of line.
vector3d< T > getMiddle() const
Get middle of line.
line3d< T > & operator-=(const vector3d< T > &point)
void setLine(const line3d< T > &line)
Set this line to new line given as parameter.
line3d< T > operator+(const vector3d< T > &point) const
vector3d< T > start
Start point of line.
vector3d< T > getClosestPoint(const vector3d< T > &point) const
Get the closest point on this line to a point.
line3d(const vector3d< T > &start, const vector3d< T > &end)
Constructor with two points as vectors.
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.
T getLength() const
Get length of line.
bool operator!=(const line3d< T > &other) const
line3d()
Default constructor.
bool isPointBetweenStartAndEnd(const vector3d< T > &point) const
Check if the given point is between start and end of the line.
line3d< T > & operator+=(const vector3d< T > &point)
vector3d< T > getVector() const
Get vector of line.
bool operator==(const line3d< T > &other) const
vector3d< T > end
End point 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.
line3d< s32 > line3di
Typedef for an integer line.
REALINLINE f32 squareroot(const f32 f)
Everything in the Irrlicht Engine can be found in this namespace.
double f64
64 bit floating point variable.