A cartesian plane with a point and a vector. More...
#include <NRE_Plane.hpp>
Public Member Functions | |
constexpr | Plane ()=default |
template<class K , class L > | |
constexpr | Plane (Vector4D< K > const &n, Point4D< L > const &p) |
template<class K , class L > | |
constexpr | Plane (Vector3D< K > const &n, Point3D< L > const &p) |
template<class K , class L , class N > | |
Plane (Point4D< K > const &p1, Point4D< L > const &p2, Point4D< N > const &p3) | |
template<class K , class L , class N > | |
Plane (Point3D< K > const &p1, Point3D< L > const &p2, Point3D< N > const &p3) | |
constexpr | Plane (Plane const &p)=default |
constexpr | Plane (Plane &&p)=default |
template<class K > | |
constexpr | Plane (Plane< K > const &p) |
~Plane ()=default | |
constexpr Vector3D< T > const & | getNormal () const |
constexpr Point3D< T > const & | getPoint () const |
template<class K > | |
constexpr void | setNormal (Vector4D< K > const &n) |
template<class K > | |
constexpr void | setNormal (Vector3D< K > const &n) |
template<class K > | |
constexpr void | setPoint (Point4D< K > const &p) |
template<class K > | |
constexpr void | setPoint (Point3D< K > const &p) |
template<class K , class L > | |
constexpr void | setNormalAndPoint (Vector4D< K > const &n, Point4D< L > const &p) |
template<class K , class L > | |
constexpr void | setNormalAndPoint (Vector3D< K > const &n, Point3D< L > const &p) |
template<class K > | |
constexpr std::common_type_t< T, K > | distance (Point4D< K > const &p) const |
template<class K > | |
constexpr std::common_type_t< T, K > | distance (Point3D< K > const &p) const |
constexpr Plane & | operator= (Plane const &p)=default |
constexpr Plane & | operator= (Plane &&p)=default |
template<class K > | |
constexpr Plane & | operator= (Plane< K > const &p) |
template<class K > | |
constexpr Plane & | operator= (Plane< K > &&p) |
template<class K > | |
constexpr bool | operator== (Plane< K > const &p) const |
template<class K > | |
constexpr bool | operator!= (Plane< K > const &p) const |
Utility::String | toString () const |
A cartesian plane with a point and a vector.
|
default |
Default constructor
constexpr NRE::Math::Plane< T >::Plane | ( | Vector4D< K > const & | n, |
Point4D< L > const & | p | ||
) |
Construct a plane with a particular point and a normal
n | the new plane's normal |
p | the new plane's point |
constexpr NRE::Math::Plane< T >::Plane | ( | Vector3D< K > const & | n, |
Point3D< L > const & | p | ||
) |
Construct a plane with a particular point and a normal
n | the new plane's normal |
p | the new plane's point |
NRE::Math::Plane< T >::Plane | ( | Point4D< K > const & | p1, |
Point4D< L > const & | p2, | ||
Point4D< N > const & | p3 | ||
) |
Construct a plane with 3 points
p1 | the first point |
p2 | the second point |
p3 | the third point |
NRE::Math::Plane< T >::Plane | ( | Point3D< K > const & | p1, |
Point3D< L > const & | p2, | ||
Point3D< N > const & | p3 | ||
) |
Construct a plane with 3 points
p1 | the first point |
p2 | the second point |
p3 | the third point |
|
default |
Copy p into this
p | the object to copy |
|
default |
Move p into this
p | the plane to move |
Convert a K-Type plane into a T-type plane
p | the K-type point to convert |
|
default |
Plane Deconstructor
constexpr std::common_type_t<T, K> NRE::Math::Plane< T >::distance | ( | Point4D< K > const & | p | ) | const |
Compute the distance between a point and a plane
p | the point to compute the distance with this |
constexpr std::common_type_t<T, K> NRE::Math::Plane< T >::distance | ( | Point3D< K > const & | p | ) | const |
Compute the distance between a point and a plane
p | the point to compute the distance with this |
constexpr Vector3D<T> const& NRE::Math::Plane< T >::getNormal | ( | ) | const |
constexpr Point3D<T> const& NRE::Math::Plane< T >::getPoint | ( | ) | const |
constexpr bool NRE::Math::Plane< T >::operator!= | ( | Plane< K > const & | p | ) | const |
Difference test between this and p
p | the plane to test with this |
|
default |
Copy p into this
p | the object to copy into this |
|
default |
Move p into this
p | the object to move into this |
constexpr Plane& NRE::Math::Plane< T >::operator= | ( | Plane< K > const & | p | ) |
Copy p into this
p | the object to copy into this |
constexpr Plane& NRE::Math::Plane< T >::operator= | ( | Plane< K > && | p | ) |
Move p into this
p | the object to move into this |
constexpr bool NRE::Math::Plane< T >::operator== | ( | Plane< K > const & | p | ) | const |
Equality test between this and p
p | the plane to test with this |
constexpr void NRE::Math::Plane< T >::setNormal | ( | Vector4D< K > const & | n | ) |
Normal setter
n | the new value for normal |
constexpr void NRE::Math::Plane< T >::setNormal | ( | Vector3D< K > const & | n | ) |
Normal setter
n | the new value for normal |
constexpr void NRE::Math::Plane< T >::setNormalAndPoint | ( | Vector4D< K > const & | n, |
Point4D< L > const & | p | ||
) |
Set the values for both normal and point
n | the new value for normal |
p | the new value for point |
constexpr void NRE::Math::Plane< T >::setNormalAndPoint | ( | Vector3D< K > const & | n, |
Point3D< L > const & | p | ||
) |
Set the values for both normal and point
n | the new value for normal |
p | the new value for point |
constexpr void NRE::Math::Plane< T >::setPoint | ( | Point4D< K > const & | p | ) |
Point setter
p | the new value for point |
constexpr void NRE::Math::Plane< T >::setPoint | ( | Point3D< K > const & | p | ) |
Point setter
p | the new value for point |
Utility::String NRE::Math::Plane< T >::toString | ( | ) | const |
Convert the plane into a string