![]() |
Nazara Engine
0.4
A fast, complete, cross-platform API designed for game development
|
Math class that represents a plane in 3D. More...
Public Member Functions | |
Plane (T normalX, T normalY, T normalZ, T Distance) | |
Constructs a Plane object from its components. More... | |
Plane (const T plane[4]) | |
Constructs a Plane object from an array of four elements. More... | |
Plane (const Vector3< T > &Normal, T Distance) | |
Constructs a Plane object from a normal and a distance. More... | |
Plane (const Vector3< T > &Normal, const Vector3< T > &point) | |
Constructs a Plane object from a normal and a point. More... | |
Plane (const Vector3< T > &point1, const Vector3< T > &point2, const Vector3< T > &point3) | |
Constructs a Plane object from three points. More... | |
template<typename U > | |
Plane (const Plane< U > &plane) | |
Constructs a Plane object from another type of Plane. More... | |
Plane (const Plane &plane)=default | |
T | Distance (T x, T y, T z) const |
Returns the distance from the plane to the point. More... | |
T | Distance (const Vector3< T > &point) const |
Returns the distance from the plane to the point. More... | |
Plane & | MakeXY () |
Makes the plane (0, 0, 1, 0) More... | |
Plane & | MakeXZ () |
Makes the plane (0, 1, 0, 0) More... | |
Plane & | MakeYZ () |
Makes the plane (1, 0, 0, 0) More... | |
Plane & | Set (T normalX, T normalY, T normalZ, T Distance) |
Sets the components of the plane. More... | |
Plane & | Set (const T plane[4]) |
Sets the components of the plane from an array of four elements. More... | |
Plane & | Set (const Plane &plane) |
Sets the components of the plane from another plane. More... | |
Plane & | Set (const Vector3< T > &Normal, T Distance) |
Sets the components of the plane from a normal and a distance. More... | |
Plane & | Set (const Vector3< T > &Normal, const Vector3< T > &point) |
Sets the components of the plane from a normal and a point. More... | |
Plane & | Set (const Vector3< T > &point1, const Vector3< T > &point2, const Vector3< T > &point3) |
Sets the components of the plane from three points. More... | |
template<typename U > | |
Plane & | Set (const Plane< U > &plane) |
String | ToString () const |
Gives a string representation. More... | |
Plane & | operator= (const Plane &other)=default |
bool | operator== (const Plane &plane) const |
Compares the plane to other one. More... | |
bool | operator!= (const Plane &plane) const |
Compares the plane to other one. More... | |
template<typename U > | |
Plane< T > & | Set (const Plane< U > &plane) |
Sets the components of the plane from another type of Plane. More... | |
Static Public Member Functions | |
static Plane | Lerp (const Plane &from, const Plane &to, T interpolation) |
Interpolates the plane to other one with a factor of interpolation. More... | |
static Plane | XY () |
Shorthand for the plane (0, 0, 1, 0) More... | |
static Plane | XZ () |
Shorthand for the plane (0, 1, 0, 0) More... | |
static Plane | YZ () |
Shorthand for the plane (1, 0, 0, 0) More... | |
Public Attributes | |
Vector3< T > | normal |
T | distance |
Math class that represents a plane in 3D.
Constructs a Plane object from its components.
normalX | X component of the normal |
normalY | Y component of the normal |
normalZ | Z component of the normal |
D | Distance to origin |
Constructs a Plane object from an array of four elements.
plane[4] | plane[0] is X component, plane[1] is Y component, plane[2] is Z component and plane[3] is D |
Constructs a Plane object from a normal and a distance.
Normal | normal of the vector |
D | Distance to origin |
Nz::Plane< T >::Plane | ( | const Vector3< T > & | Normal, |
const Vector3< T > & | point | ||
) |
Constructs a Plane object from a normal and a point.
Normal | Normal of the plane |
point | Point which verifies the equation of the plane |
Nz::Plane< T >::Plane | ( | const Vector3< T > & | point1, |
const Vector3< T > & | point2, | ||
const Vector3< T > & | point3 | ||
) |
Constructs a Plane object from three points.
point1 | First point |
point2 | Second point |
point3 | Third point |
T Nz::Plane< T >::Distance | ( | T | x, |
T | y, | ||
T | z | ||
) | const |
Returns the distance from the plane to the point.
X | X position of the point |
Y | Y position of the point |
Z | Z position of the point |
Returns the distance from the plane to the point.
point | Position of the point |
|
static |
Interpolates the plane to other one with a factor of interpolation.
from | Initial plane |
to | Target plane |
interpolation | Factor of interpolation |
Makes the plane (0, 0, 1, 0)
Makes the plane (0, 1, 0, 0)
Makes the plane (1, 0, 0, 0)
Compares the plane to other one.
plane | Other plane to compare with |
Compares the plane to other one.
vec | Other vector to compare with |
Sets the components of the plane.
normalX | X component of the normal |
normalY | Y component of the normal |
normalZ | Z component of the normal |
D | Distance to origin |
Sets the components of the plane from an array of four elements.
plane[4] | plane[0] is X component, plane[1] is Y component, plane[2] is Z component and plane[3] is D |
Sets the components of the plane from another plane.
plane | The other plane |
Sets the components of the plane from a normal and a distance.
Normal | Normal of the vector |
D | Distance to origin |
Plane< T > & Nz::Plane< T >::Set | ( | const Vector3< T > & | Normal, |
const Vector3< T > & | point | ||
) |
Sets the components of the plane from a normal and a point.
Normal | Normal of the plane |
point | Point which verifies the equation of the plane |
Plane< T > & Nz::Plane< T >::Set | ( | const Vector3< T > & | point1, |
const Vector3< T > & | point2, | ||
const Vector3< T > & | point3 | ||
) |
Sets the components of the plane from three points.
point1 | First point |
point2 | Second point |
point3 | Third point |
Gives a string representation.