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

A frustum describing 6 planes. More...

#include "murl_math_frustum.h"

Public Types

enum  ClipPlane {
  CLIP_PLANE_LEFT , CLIP_PLANE_RIGHT , CLIP_PLANE_TOP , CLIP_PLANE_BOTTOM ,
  CLIP_PLANE_NEAR , CLIP_PLANE_FAR , NUM_CLIP_PLANES
}
 Enumeration of the frustum planes. More...
 
using ValueType = DataType
 The template parameter value type.
 

Public Member Functions

 Frustum ()
 The default constructor.
 
 Frustum (const Matrix< DataType > &projectionMatrix)
 Constructor taking a projection matrix. More...
 
template<class DataType2 >
 Frustum (const Frustum< DataType2 > &f)
 The copy constructor using a frustum of different type. More...
 
void Set (const Matrix< DataType > &projectionMatrix)
 Set the frustum planes by a projection matrix. More...
 
const Plane< DataType > & GetClipPlane (ClipPlane plane) const
 Get a plane by identifier. More...
 

Protected Attributes

Plane< DataType > mClipPlanes [NUM_CLIP_PLANES]
 The plane storage array.
 

Detailed Description

template<class DataType>
class Murl::Math::Frustum< DataType >

A frustum describing 6 planes.

Member Enumeration Documentation

◆ ClipPlane

template<class DataType >
enum Murl::Math::Frustum::ClipPlane

Enumeration of the frustum planes.

Enumerator
CLIP_PLANE_LEFT 

The left plane.

CLIP_PLANE_RIGHT 

The right plane.

CLIP_PLANE_TOP 

The top plane.

CLIP_PLANE_BOTTOM 

The bottom plane.

CLIP_PLANE_NEAR 

The near plane.

CLIP_PLANE_FAR 

The far plane.

NUM_CLIP_PLANES 

The number of planes.

Constructor & Destructor Documentation

◆ Frustum() [1/2]

template<class DataType >
Murl::Math::Frustum< DataType >::Frustum ( const Matrix< DataType > &  projectionMatrix)
inline

Constructor taking a projection matrix.

Parameters
projectionMatrixThe projection matrix.

References Murl::Math::Frustum< DataType >::Set().

◆ Frustum() [2/2]

template<class DataType >
template<class DataType2 >
Murl::Math::Frustum< DataType >::Frustum ( const Frustum< DataType2 > &  f)
inline

The copy constructor using a frustum of different type.

Parameters
fThe frustum to copy.

References Murl::Math::Frustum< DataType >::mClipPlanes, and Murl::Math::Frustum< DataType >::NUM_CLIP_PLANES.

Member Function Documentation

◆ Set()

◆ GetClipPlane()

template<class DataType >
const Plane<DataType>& Murl::Math::Frustum< DataType >::GetClipPlane ( ClipPlane  plane) const
inline

Get a plane by identifier.

Parameters
planeThe enumerated plane identifer.
Returns
The plane.

References Murl::Math::Frustum< DataType >::mClipPlanes.

Referenced by Murl::Math::Cone< DataType >::Set().


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


Copyright © 2011-2024 Spraylight GmbH.