Pyrogenesis HEAD
Pyrogenesis, a RTS Engine
CMatrix3D Class Reference

#include <Matrix3D.h>

Public Member Functions

 CMatrix3D ()
 
 CMatrix3D (float a11, float a12, float a13, float a14, float a21, float a22, float a23, float a24, float a31, float a32, float a33, float a34, float a41, float a42, float a43, float a44)
 
 CMatrix3D (float data[])
 
 CMatrix3D (const float data[])
 
float & operator() (int col, int row)
 
const float & operator() (int col, int row) const
 
float & operator[] (int idx)
 
const float & operator[] (int idx) const
 
CMatrix3D operator* (const CMatrix3D &matrix) const
 
CMatrix3Doperator*= (const CMatrix3D &matrix)
 
CMatrix3D operator* (float f) const
 
CMatrix3D operator+ (const CMatrix3D &m) const
 
CMatrix3Doperator+= (const CMatrix3D &m)
 
bool operator== (const CMatrix3D &m) const
 
bool operator!= (const CMatrix3D &m) const
 
void SetIdentity ()
 
void SetZero ()
 
void SetOrtho (float left, float right, float bottom, float top, float near, float far)
 
void SetPerspective (float fov, float aspect, float near, float far)
 
void SetPerspectiveTile (float fov, float aspect, float near, float far, int tiles, int tile_x, int tile_y)
 
void Concatenate (const CMatrix3D &m)
 
void Blend (const CMatrix3D &m, float f)
 
void AddBlend (const CMatrix3D &m, float f)
 
void SetXRotation (float angle)
 
void SetYRotation (float angle)
 
void SetZRotation (float angle)
 
void SetRotation (const CQuaternion &quat)
 
void RotateX (float angle)
 
void RotateY (float angle)
 
void RotateZ (float angle)
 
void Rotate (const CQuaternion &quat)
 
void SetTranslation (float x, float y, float z)
 
void SetTranslation (const CVector3D &vector)
 
void Translate (float x, float y, float z)
 
void Translate (const CVector3D &vector)
 
void PostTranslate (float x, float y, float z)
 
void SetScaling (float x_scale, float y_scale, float z_scale)
 
void Scale (float x_scale, float y_scale, float z_scale)
 
void GetInverse (CMatrix3D &dst) const
 
CMatrix3D GetInverse () const
 
CMatrix3D GetTranspose () const
 
CVector3D GetTranslation () const
 
CVector3D GetLeft () const
 
CVector3D GetUp () const
 
CVector3D GetIn () const
 
CQuaternion GetRotation () const
 
float GetYRotation () const
 
CVector3D Transform (const CVector3D &vector) const
 
void Transform (const CVector3D &vector, CVector3D &result) const
 
CVector4D Transform (const CVector4D &vector) const
 
void Transform (const CVector4D &vector, CVector4D &result) const
 
CVector3D Rotate (const CVector3D &vector) const
 
void Rotate (const CVector3D &vector, CVector3D &result) const
 
void RotateTransposed (const CVector3D &vector, CVector3D &result) const
 
CVector3D RotateTransposed (const CVector3D &vector) const
 
PS::span< const float > AsFloatArray () const
 

Public Attributes

union {
   struct {
      float   _11
 
      float   _21
 
      float   _31
 
      float   _41
 
      float   _12
 
      float   _22
 
      float   _32
 
      float   _42
 
      float   _13
 
      float   _23
 
      float   _33
 
      float   _43
 
      float   _14
 
      float   _24
 
      float   _34
 
      float   _44
 
   } 
 
   float   _data [16]
 
   float   _data2d [4][4]
 
}; 
 

Constructor & Destructor Documentation

◆ CMatrix3D() [1/4]

CMatrix3D::CMatrix3D ( )
inline

◆ CMatrix3D() [2/4]

CMatrix3D::CMatrix3D ( float  a11,
float  a12,
float  a13,
float  a14,
float  a21,
float  a22,
float  a23,
float  a24,
float  a31,
float  a32,
float  a33,
float  a34,
float  a41,
float  a42,
float  a43,
float  a44 
)
inline

◆ CMatrix3D() [3/4]

CMatrix3D::CMatrix3D ( float  data[])
inline

◆ CMatrix3D() [4/4]

CMatrix3D::CMatrix3D ( const float  data[])
inline

Member Function Documentation

◆ AddBlend()

void CMatrix3D::AddBlend ( const CMatrix3D m,
float  f 
)
inline

◆ AsFloatArray()

PS::span< const float > CMatrix3D::AsFloatArray ( ) const
inline

◆ Blend()

void CMatrix3D::Blend ( const CMatrix3D m,
float  f 
)
inline

◆ Concatenate()

void CMatrix3D::Concatenate ( const CMatrix3D m)
inline

◆ GetIn()

CVector3D CMatrix3D::GetIn ( ) const

◆ GetInverse() [1/2]

CMatrix3D CMatrix3D::GetInverse ( ) const

◆ GetInverse() [2/2]

void CMatrix3D::GetInverse ( CMatrix3D dst) const

◆ GetLeft()

CVector3D CMatrix3D::GetLeft ( ) const

◆ GetRotation()

CQuaternion CMatrix3D::GetRotation ( ) const

◆ GetTranslation()

CVector3D CMatrix3D::GetTranslation ( ) const

◆ GetTranspose()

CMatrix3D CMatrix3D::GetTranspose ( ) const

◆ GetUp()

CVector3D CMatrix3D::GetUp ( ) const

◆ GetYRotation()

float CMatrix3D::GetYRotation ( ) const

◆ operator!=()

bool CMatrix3D::operator!= ( const CMatrix3D m) const
inline

◆ operator()() [1/2]

float & CMatrix3D::operator() ( int  col,
int  row 
)
inline

◆ operator()() [2/2]

const float & CMatrix3D::operator() ( int  col,
int  row 
) const
inline

◆ operator*() [1/2]

CMatrix3D CMatrix3D::operator* ( const CMatrix3D matrix) const
inline

◆ operator*() [2/2]

CMatrix3D CMatrix3D::operator* ( float  f) const
inline

◆ operator*=()

CMatrix3D & CMatrix3D::operator*= ( const CMatrix3D matrix)
inline

◆ operator+()

CMatrix3D CMatrix3D::operator+ ( const CMatrix3D m) const
inline

◆ operator+=()

CMatrix3D & CMatrix3D::operator+= ( const CMatrix3D m)
inline

◆ operator==()

bool CMatrix3D::operator== ( const CMatrix3D m) const
inline

◆ operator[]() [1/2]

float & CMatrix3D::operator[] ( int  idx)
inline

◆ operator[]() [2/2]

const float & CMatrix3D::operator[] ( int  idx) const
inline

◆ PostTranslate()

void CMatrix3D::PostTranslate ( float  x,
float  y,
float  z 
)

◆ Rotate() [1/3]

void CMatrix3D::Rotate ( const CQuaternion quat)

◆ Rotate() [2/3]

CVector3D CMatrix3D::Rotate ( const CVector3D vector) const
inline

◆ Rotate() [3/3]

void CMatrix3D::Rotate ( const CVector3D vector,
CVector3D result 
) const
inline

◆ RotateTransposed() [1/2]

CVector3D CMatrix3D::RotateTransposed ( const CVector3D vector) const

◆ RotateTransposed() [2/2]

void CMatrix3D::RotateTransposed ( const CVector3D vector,
CVector3D result 
) const

◆ RotateX()

void CMatrix3D::RotateX ( float  angle)

◆ RotateY()

void CMatrix3D::RotateY ( float  angle)

◆ RotateZ()

void CMatrix3D::RotateZ ( float  angle)

◆ Scale()

void CMatrix3D::Scale ( float  x_scale,
float  y_scale,
float  z_scale 
)

◆ SetIdentity()

void CMatrix3D::SetIdentity ( )

◆ SetOrtho()

void CMatrix3D::SetOrtho ( float  left,
float  right,
float  bottom,
float  top,
float  near,
float  far 
)

◆ SetPerspective()

void CMatrix3D::SetPerspective ( float  fov,
float  aspect,
float  near,
float  far 
)

◆ SetPerspectiveTile()

void CMatrix3D::SetPerspectiveTile ( float  fov,
float  aspect,
float  near,
float  far,
int  tiles,
int  tile_x,
int  tile_y 
)

◆ SetRotation()

void CMatrix3D::SetRotation ( const CQuaternion quat)

◆ SetScaling()

void CMatrix3D::SetScaling ( float  x_scale,
float  y_scale,
float  z_scale 
)

◆ SetTranslation() [1/2]

void CMatrix3D::SetTranslation ( const CVector3D vector)

◆ SetTranslation() [2/2]

void CMatrix3D::SetTranslation ( float  x,
float  y,
float  z 
)

◆ SetXRotation()

void CMatrix3D::SetXRotation ( float  angle)

◆ SetYRotation()

void CMatrix3D::SetYRotation ( float  angle)

◆ SetZero()

void CMatrix3D::SetZero ( )

◆ SetZRotation()

void CMatrix3D::SetZRotation ( float  angle)

◆ Transform() [1/4]

CVector3D CMatrix3D::Transform ( const CVector3D vector) const
inline

◆ Transform() [2/4]

void CMatrix3D::Transform ( const CVector3D vector,
CVector3D result 
) const
inline

◆ Transform() [3/4]

CVector4D CMatrix3D::Transform ( const CVector4D vector) const
inline

◆ Transform() [4/4]

void CMatrix3D::Transform ( const CVector4D vector,
CVector4D result 
) const
inline

◆ Translate() [1/2]

void CMatrix3D::Translate ( const CVector3D vector)

◆ Translate() [2/2]

void CMatrix3D::Translate ( float  x,
float  y,
float  z 
)

Member Data Documentation

◆ 

union { ... } CMatrix3D::@23

◆ _11

float CMatrix3D::_11

◆ _12

float CMatrix3D::_12

◆ _13

float CMatrix3D::_13

◆ _14

float CMatrix3D::_14

◆ _21

float CMatrix3D::_21

◆ _22

float CMatrix3D::_22

◆ _23

float CMatrix3D::_23

◆ _24

float CMatrix3D::_24

◆ _31

float CMatrix3D::_31

◆ _32

float CMatrix3D::_32

◆ _33

float CMatrix3D::_33

◆ _34

float CMatrix3D::_34

◆ _41

float CMatrix3D::_41

◆ _42

float CMatrix3D::_42

◆ _43

float CMatrix3D::_43

◆ _44

float CMatrix3D::_44

◆ _data

float CMatrix3D::_data[16]

◆ _data2d

float CMatrix3D::_data2d[4][4]

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