NRE::Math::Plane< T > Class Template Reference

A cartesian plane with a point and a vector. More...

#include <NRE_Plane.hpp>

Inheritance diagram for NRE::Math::Plane< T >:

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 Planeoperator= (Plane const &p)=default
 
constexpr Planeoperator= (Plane &&p)=default
 
template<class K >
constexpr Planeoperator= (Plane< K > const &p)
 
template<class K >
constexpr Planeoperator= (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
 

Detailed Description

template<class T>
class NRE::Math::Plane< T >

A cartesian plane with a point and a vector.

Constructor & Destructor Documentation

template<class T>
constexpr NRE::Math::Plane< T >::Plane ( )
default

Default constructor

template<class T>
template<class K , class L >
constexpr NRE::Math::Plane< T >::Plane ( Vector4D< K > const &  n,
Point4D< L > const &  p 
)

Construct a plane with a particular point and a normal

Parameters
nthe new plane's normal
pthe new plane's point
template<class T>
template<class K , class L >
constexpr NRE::Math::Plane< T >::Plane ( Vector3D< K > const &  n,
Point3D< L > const &  p 
)

Construct a plane with a particular point and a normal

Parameters
nthe new plane's normal
pthe new plane's point
template<class T>
template<class K , class L , class N >
NRE::Math::Plane< T >::Plane ( Point4D< K > const &  p1,
Point4D< L > const &  p2,
Point4D< N > const &  p3 
)

Construct a plane with 3 points

Parameters
p1the first point
p2the second point
p3the third point
template<class T>
template<class K , class L , class N >
NRE::Math::Plane< T >::Plane ( Point3D< K > const &  p1,
Point3D< L > const &  p2,
Point3D< N > const &  p3 
)

Construct a plane with 3 points

Parameters
p1the first point
p2the second point
p3the third point
template<class T>
constexpr NRE::Math::Plane< T >::Plane ( Plane< T > const &  p)
default

Copy p into this

Parameters
pthe object to copy
template<class T>
constexpr NRE::Math::Plane< T >::Plane ( Plane< T > &&  p)
default

Move p into this

Parameters
pthe plane to move
template<class T>
template<class K >
constexpr NRE::Math::Plane< T >::Plane ( Plane< K > const &  p)

Convert a K-Type plane into a T-type plane

Parameters
pthe K-type point to convert
template<class T>
NRE::Math::Plane< T >::~Plane ( )
default

Plane Deconstructor

Member Function Documentation

template<class T>
template<class K >
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

Parameters
pthe point to compute the distance with this
Returns
the computed distance
template<class T>
template<class K >
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

Parameters
pthe point to compute the distance with this
Returns
the computed distance
template<class T>
constexpr Vector3D<T> const& NRE::Math::Plane< T >::getNormal ( ) const
Returns
the plane's normal
template<class T>
constexpr Point3D<T> const& NRE::Math::Plane< T >::getPoint ( ) const
Returns
the plane's point
template<class T>
template<class K >
constexpr bool NRE::Math::Plane< T >::operator!= ( Plane< K > const &  p) const

Difference test between this and p

Parameters
pthe plane to test with this
Returns
the test's result
template<class T>
constexpr Plane& NRE::Math::Plane< T >::operator= ( Plane< T > const &  p)
default

Copy p into this

Parameters
pthe object to copy into this
Returns
the reference of himself
template<class T>
constexpr Plane& NRE::Math::Plane< T >::operator= ( Plane< T > &&  p)
default

Move p into this

Parameters
pthe object to move into this
Returns
the reference of himself
template<class T>
template<class K >
constexpr Plane& NRE::Math::Plane< T >::operator= ( Plane< K > const &  p)

Copy p into this

Parameters
pthe object to copy into this
Returns
the reference of himself
template<class T>
template<class K >
constexpr Plane& NRE::Math::Plane< T >::operator= ( Plane< K > &&  p)

Move p into this

Parameters
pthe object to move into this
Returns
the reference of himself
template<class T>
template<class K >
constexpr bool NRE::Math::Plane< T >::operator== ( Plane< K > const &  p) const

Equality test between this and p

Parameters
pthe plane to test with this
Returns
the test's result
template<class T>
template<class K >
constexpr void NRE::Math::Plane< T >::setNormal ( Vector4D< K > const &  n)

Normal setter

Parameters
nthe new value for normal
template<class T>
template<class K >
constexpr void NRE::Math::Plane< T >::setNormal ( Vector3D< K > const &  n)

Normal setter

Parameters
nthe new value for normal
template<class T>
template<class K , class L >
constexpr void NRE::Math::Plane< T >::setNormalAndPoint ( Vector4D< K > const &  n,
Point4D< L > const &  p 
)

Set the values for both normal and point

Parameters
nthe new value for normal
pthe new value for point
template<class T>
template<class K , class L >
constexpr void NRE::Math::Plane< T >::setNormalAndPoint ( Vector3D< K > const &  n,
Point3D< L > const &  p 
)

Set the values for both normal and point

Parameters
nthe new value for normal
pthe new value for point
template<class T>
template<class K >
constexpr void NRE::Math::Plane< T >::setPoint ( Point4D< K > const &  p)

Point setter

Parameters
pthe new value for point
template<class T>
template<class K >
constexpr void NRE::Math::Plane< T >::setPoint ( Point3D< K > const &  p)

Point setter

Parameters
pthe new value for point
template<class T>
Utility::String NRE::Math::Plane< T >::toString ( ) const

Convert the plane into a string

Returns
the converted plane

The documentation for this class was generated from the following files:
  • /mnt/c/Users/abell/Documents/GitHub/NRE-Math/src/Math/Matrix/4D/NRE_Matrix4x4.hpp
  • /mnt/c/Users/abell/Documents/GitHub/NRE-Math/src/Math/Plane/NRE_Plane.hpp