A plane class describing the equation for a plane a*x + b*y + c*z + d = 0. More...
#include "murl_math_plane.h"
Public Types | |
| using | ValueType = DataType |
| The template parameter value type. | |
Public Member Functions | |
| Plane () | |
| The default constructor. | |
| template<class DataType2 > | |
| Plane (const Plane< DataType2 > &p) | |
| The copy constructor using a plane of different type. More... | |
| void | Set (DataType a, DataType b, DataType c, DataType d) |
| Set all variables of the equation for a plane a*x + b*y + c*z + d = 0. More... | |
| void | NormalizeSelf () |
| Normalize the plane. | |
| DataType | GetPointDistance (const Vector< DataType > &point) const |
| Get the distance from a point to the plane. More... | |
| String | ToString () const |
| Get the string representation of the object. More... | |
Public Attributes | |
| DataType | mA |
| The a variable. | |
| DataType | mB |
| The b variable. | |
| DataType | mC |
| The c variable. | |
| DataType | mD |
| The d variable. | |
Detailed Description
template<class DataType>
class Murl::Math::Plane< DataType >
A plane class describing the equation for a plane a*x + b*y + c*z + d = 0.
Constructor & Destructor Documentation
◆ Plane()
|
inline |
The copy constructor using a plane of different type.
- Parameters
-
p The plane to copy.
Member Function Documentation
◆ Set()
|
inline |
Set all variables of the equation for a plane a*x + b*y + c*z + d = 0.
- Parameters
-
a The a variable. b The b variable. c The c variable. d The d variable.
References Murl::Math::Plane< DataType >::mA, Murl::Math::Plane< DataType >::mB, Murl::Math::Plane< DataType >::mC, and Murl::Math::Plane< DataType >::mD.
Referenced by Murl::Math::Frustum< DataType >::Set().
◆ GetPointDistance()
|
inline |
Get the distance from a point to the plane.
- Parameters
-
point The point to measure the distance from.
- Returns
- The distance between the point and the plane.
References Murl::Math::Plane< DataType >::mA, Murl::Math::Plane< DataType >::mB, Murl::Math::Plane< DataType >::mC, Murl::Math::Plane< DataType >::mD, Murl::Math::Vector< DataType >::x, Murl::Math::Vector< DataType >::y, and Murl::Math::Vector< DataType >::z.
◆ ToString()
|
inline |
Get the string representation of the object.
- Returns
- The string representation of the object.
References Murl::Math::Plane< DataType >::mA, Murl::Math::Plane< DataType >::mB, Murl::Math::Plane< DataType >::mC, Murl::Math::Plane< DataType >::mD, and Murl::Util::PrintToString().
The documentation for this class was generated from the following files:
- murl_graph_types.h
- murl_math_plane.h