Photon Engine 2.0.0-beta
A physically based renderer.
Loading...
Searching...
No Matches
ph::math::TMatrix4< T > Class Template Referencefinal

Represents a 4x4 matrix. More...

#include <TMatrix4.h>

Public Types

using Elements = std::array<std::array<T, 4>, 4>
 

Public Member Functions

 TMatrix4 ()=default
 
 TMatrix4 (T value)
 
 TMatrix4 (const Elements &elements)
 
 TMatrix4 (const TMatrix4 &other)=default
 
template<typename U >
 TMatrix4 (const TMatrix4< U > &other)
 
TMatrix4initIdentity ()
 
TMatrix4initTranslation (T x, T y, T z)
 
TMatrix4initTranslation (const TVector3< T > &value)
 
TMatrix4initRotation (const TQuaternion< T > &rot)
 
TMatrix4initRotation (const TVector3< T > &orthBasisX, const TVector3< T > &orthBasisY, const TVector3< T > &orthBasisZ)
 
TMatrix4initScale (T x, T y, T z)
 
TMatrix4initScale (const TVector3< T > &scale)
 
TMatrix4initPerspectiveProjection (T fov, T aspectRatio, T zNear, T zFar)
 
TMatrix4 mul (const TMatrix4 &rhs) const
 
void mul (const TMatrix4 &rhs, TMatrix4 *out_result) const
 
void mul (const TVector3< T > &rhsXYZ, T rhsW, TVector3< T > *out_result) const
 
TMatrix4mulLocal (T rhs)
 
TMatrix4inverse (TMatrix4 *out_result) const
 
TMatrix4 transpose () const
 
determinant () const
 
bool isEqual (const TMatrix4 &other) const
 
std::string toString () const
 

Static Public Member Functions

static TMatrix4 makeIdentity ()
 

Public Attributes

Elements m
 

Detailed Description

template<typename T>
class ph::math::TMatrix4< T >

Represents a 4x4 matrix.

Member Typedef Documentation

◆ Elements

template<typename T >
using ph::math::TMatrix4< T >::Elements = std::array<std::array<T, 4>, 4>

Constructor & Destructor Documentation

◆ TMatrix4() [1/5]

template<typename T >
ph::math::TMatrix4< T >::TMatrix4 ( )
inlinedefault

◆ TMatrix4() [2/5]

template<typename T >
ph::math::TMatrix4< T >::TMatrix4 ( T value)
inlineexplicit

◆ TMatrix4() [3/5]

template<typename T >
ph::math::TMatrix4< T >::TMatrix4 ( const Elements & elements)
inlineexplicit

◆ TMatrix4() [4/5]

template<typename T >
ph::math::TMatrix4< T >::TMatrix4 ( const TMatrix4< T > & other)
inlinedefault

◆ TMatrix4() [5/5]

template<typename T >
template<typename U >
ph::math::TMatrix4< T >::TMatrix4 ( const TMatrix4< U > & other)
inlineexplicit

Member Function Documentation

◆ determinant()

template<typename T >
T ph::math::TMatrix4< T >::determinant ( ) const
inline

◆ initIdentity()

template<typename T >
TMatrix4< T > & ph::math::TMatrix4< T >::initIdentity ( )
inline

◆ initPerspectiveProjection()

template<typename T >
TMatrix4< T > & ph::math::TMatrix4< T >::initPerspectiveProjection ( T fov,
T aspectRatio,
T zNear,
T zFar )
inline

◆ initRotation() [1/2]

template<typename T >
TMatrix4< T > & ph::math::TMatrix4< T >::initRotation ( const TQuaternion< T > & rot)
inline

◆ initRotation() [2/2]

template<typename T >
TMatrix4< T > & ph::math::TMatrix4< T >::initRotation ( const TVector3< T > & orthBasisX,
const TVector3< T > & orthBasisY,
const TVector3< T > & orthBasisZ )
inline

◆ initScale() [1/2]

template<typename T >
TMatrix4< T > & ph::math::TMatrix4< T >::initScale ( const TVector3< T > & scale)
inline

◆ initScale() [2/2]

template<typename T >
TMatrix4< T > & ph::math::TMatrix4< T >::initScale ( T x,
T y,
T z )
inline

◆ initTranslation() [1/2]

template<typename T >
TMatrix4< T > & ph::math::TMatrix4< T >::initTranslation ( const TVector3< T > & value)
inline

◆ initTranslation() [2/2]

template<typename T >
TMatrix4< T > & ph::math::TMatrix4< T >::initTranslation ( T x,
T y,
T z )
inline

◆ inverse()

template<typename T >
TMatrix4< T > & ph::math::TMatrix4< T >::inverse ( TMatrix4< T > * out_result) const
inline

◆ isEqual()

template<typename T >
bool ph::math::TMatrix4< T >::isEqual ( const TMatrix4< T > & other) const
inline

◆ makeIdentity()

template<typename T >
TMatrix4< T > ph::math::TMatrix4< T >::makeIdentity ( )
static

◆ mul() [1/3]

template<typename T >
TMatrix4< T > ph::math::TMatrix4< T >::mul ( const TMatrix4< T > & rhs) const
inline

◆ mul() [2/3]

template<typename T >
void ph::math::TMatrix4< T >::mul ( const TMatrix4< T > & rhs,
TMatrix4< T > * out_result ) const
inline

◆ mul() [3/3]

template<typename T >
void ph::math::TMatrix4< T >::mul ( const TVector3< T > & rhsXYZ,
T rhsW,
TVector3< T > * out_result ) const
inline

◆ mulLocal()

template<typename T >
TMatrix4< T > & ph::math::TMatrix4< T >::mulLocal ( T rhs)
inline

◆ toString()

template<typename T >
std::string ph::math::TMatrix4< T >::toString ( ) const
inline

◆ transpose()

template<typename T >
TMatrix4< T > ph::math::TMatrix4< T >::transpose ( ) const
inline

Member Data Documentation

◆ m

template<typename T >
Elements ph::math::TMatrix4< T >::m

The documentation for this class was generated from the following files: