Murl::Math::Plane< DataType > Class Template Reference

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

typedef DataType ValueType
 The template parameter value type. More...
 

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. More...
 
DataType mB
 The b variable. More...
 
DataType mC
 The c variable. More...
 
DataType mD
 The d variable. More...
 

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.

Member Typedef Documentation

◆ ValueType

template<class DataType>
typedef DataType Murl::Math::Plane< DataType >::ValueType

The template parameter value type.

Constructor & Destructor Documentation

◆ Plane()

template<class DataType>
template<class DataType2 >
Murl::Math::Plane< DataType >::Plane ( const Plane< DataType2 > &  p)
inline

The copy constructor using a plane of different type.

Parameters
pThe plane to copy.

Member Function Documentation

◆ Set()

template<class DataType>
void Murl::Math::Plane< DataType >::Set ( DataType  a,
DataType  b,
DataType  c,
DataType  d 
)
inline

Set all variables of the equation for a plane a*x + b*y + c*z + d = 0.

Parameters
aThe a variable.
bThe b variable.
cThe c variable.
dThe d variable.

Referenced by Murl::Math::Frustum< Real >::Set().

◆ GetPointDistance()

template<class DataType>
DataType Murl::Math::Plane< DataType >::GetPointDistance ( const Vector< DataType > &  point) const
inline

Get the distance from a point to the plane.

Parameters
pointThe point to measure the distance from.
Returns
The distance between the point and the plane.

◆ ToString()

template<class DataType>
String Murl::Math::Plane< DataType >::ToString ( ) const
inline

Get the string representation of the object.

Returns
The string representation of the object.

Member Data Documentation

◆ mA

◆ mB

◆ mC

◆ mD


The documentation for this class was generated from the following files:
  • murl_graph_types.h
  • murl_math_plane.h


Copyright © 2011-2018 Spraylight GmbH.