|
"L. Spiro Engine"
|
The base matrix template allowing any type of number to be used. Vectors are stored row-major. More...
#include <LSMMatrix4x4Base.h>
Public Member Functions | |
| LSE_CALLCTOR | CMatrix4x4Base (const CMatrix4x4Base< _tType, _tVector3Type, _tVector4Type > &_m44bOther) |
| LSE_CALLCTOR | CMatrix4x4Base (_tType _t11, _tType _t12, _tType _t13, _tType _t14, _tType _t21, _tType _t22, _tType _t23, _tType _t24, _tType _t31, _tType _t32, _tType _t33, _tType _t34, _tType _t41, _tType _t42, _tType _t43, _tType _t44) |
| LSE_CALLCTOR | CMatrix4x4Base (const CMatrix4x4Base< _tType, _tVector3Type, _tVector4Type > &_m44bOther, LSBOOL _bTranspose) |
| LSE_CALLCTOR | CMatrix4x4Base (const _tType *_ptArray) |
| _tType &LSE_FCALL | operator() (LSUINT32 _ui32Row, LSUINT32 _ui32Col) |
| _tType LSE_FCALL | operator() (LSUINT32 _ui32Row, LSUINT32 _ui32Col) const |
| CMatrix4x4Base< _tType, _tVector3Type, _tVector4Type > LSE_FCALL | operator* (const CMatrix4x4Base< _tType, _tVector3Type, _tVector4Type > &_mOther) const |
| _tVector3Type LSE_FCALL | operator* (const _tVector3Type &_v3bOther) const |
| CMatrix4x4Base< _tType, _tVector3Type, _tVector4Type > &LSE_FCALL | operator= (const CMatrix4x4Base< _tType, _tVector3Type, _tVector4Type > &_mOther) |
| LSVOID LSE_FCALL | Set (_tType _t11, _tType _t12, _tType _t13, _tType _t14, _tType _t21, _tType _t22, _tType _t23, _tType _t24, _tType _t31, _tType _t32, _tType _t33, _tType _t34, _tType _t41, _tType _t42, _tType _t43, _tType _t44) |
| CMatrix4x4Base< _tType, _tVector3Type, _tVector4Type > &LSE_FCALL | Identity () |
| CMatrix4x4Base< _tType, _tVector3Type, _tVector4Type > &LSE_FCALL | Transpose () |
| CMatrix4x4Base< _tType, _tVector3Type, _tVector4Type > LSE_FCALL | Inverse () const |
| _tType LSE_FCALL | Determ () const |
| LSVOID LSE_FCALL | GetRow (LSUINT32 _ui32Row, _tVector3Type &_v3bRet) const |
| LSVOID LSE_FCALL | GetRow (LSUINT32 _ui32Row, _tVector4Type &_v4bRet) const |
| LSVOID LSE_FCALL | SetRow (LSUINT32 _ui32Row, const _tVector3Type &_v3bVec) |
| LSVOID LSE_FCALL | SetRow (LSUINT32 _ui32Row, const _tVector4Type &_v4bVec) |
| LSVOID LSE_FCALL | PerspectiveFovRH (_tType _tFov, _tType _tAspect, _tType _tNear, _tType _tFar) |
| LSVOID LSE_FCALL | PerspectiveFovRH (_tType _tFov, _tType _tAspect, _tType _tNear) |
| LSVOID LSE_FCALL | OrthoOffCenterRH (_tType _tLeft, _tType _tRight, _tType _tBottom, _tType _tTop, _tType _tNear, _tType _tFar) |
| LSVOID LSE_FCALL | OrthoOffCenterLH (_tType _tLeft, _tType _tRight, _tType _tBottom, _tType _tTop, _tType _tNear, _tType _tFar) |
| CMatrix4x4Base< _tType, _tVector3Type, _tVector4Type > &LSE_FCALL | MatrixRotationAxis (_tType _tX, _tType _tY, _tType _tZ, _tType _tAngle) |
| CMatrix4x4Base< _tType, _tVector3Type, _tVector4Type > &LSE_FCALL | MatrixRotationAxis (const _tVector3Type &_v3bAxis, _tType _tAngle) |
| CMatrix4x4Base< _tType, _tVector3Type, _tVector4Type > &LSE_FCALL | MatrixRotationX (_tType _tAngle) |
| CMatrix4x4Base< _tType, _tVector3Type, _tVector4Type > &LSE_FCALL | MatrixRotationY (_tType _tAngle) |
| CMatrix4x4Base< _tType, _tVector3Type, _tVector4Type > &LSE_FCALL | MatrixRotationZ (_tType _tAngle) |
| CMatrix4x4Base< _tType, _tVector3Type, _tVector4Type > &LSE_FCALL | MatrixRotationYawPitchRoll (_tType _tYaw, _tType _tPitch, _tType _tRoll) |
| CMatrix4x4Base< _tType, _tVector3Type, _tVector4Type > &LSE_FCALL | MatrixScaling (_tType _tX, _tType _tY, _tType _tZ) |
| CMatrix4x4Base< _tType, _tVector3Type, _tVector4Type > &LSE_FCALL | MatrixTranslation (_tType _tX, _tType _tY, _tType _tZ) |
| LSVOID LSE_FCALL | GetYawPitchRoll (_tType &_tYaw, _tType &_tPitch, _tType &_tRoll) const |
Static Public Member Functions | |
| static _tVector3Type LSE_FCALL | MultiplyVec3 (const CMatrix4x4Base< _tType, _tVector3Type, _tVector4Type > &_m44bMat, const _tVector3Type &_v3bIn) |
| static _tVector3Type LSE_FCALL | MultiplyVec3Normal (const CMatrix4x4Base< _tType, _tVector3Type, _tVector4Type > &_m44bMat, const _tVector3Type &_v3bIn) |
| static _tVector4Type LSE_FCALL | MultiplyVec4 (const CMatrix4x4Base< _tType, _tVector3Type, _tVector4Type > &_m44bMat, const _tVector4Type &_v4bIn) |
| static LSVOID LSE_FCALL | MultiplyVec3Batch (const CMatrix4x4Base< _tType, _tVector3Type, _tVector4Type > &_m44bMat, const _tVector3Type *_pv3bIn, LSUINT32 _ui32Total, _tVector3Type *_pv3bOut) |
| static LSVOID LSE_FCALL | MultiplyVec3BatchNormal (const CMatrix4x4Base< _tType, _tVector3Type, _tVector4Type > &_m44bMat, const _tVector3Type *_pv3bIn, LSUINT32 _ui32Total, _tVector3Type *_pv3bOut) |
| static LSVOID LSE_FCALL | MultiplyVec4Batch (const CMatrix4x4Base< _tType, _tVector3Type, _tVector4Type > &_m44bMat, const _tVector4Type *_pv4bIn, LSUINT32 _ui32Total, _tVector4Type *_pv4bOut) |
Public Attributes | |
| _tType | _11 |
| _tType | _12 |
| _tType | _13 |
| _tType | _14 |
| _tType | _21 |
| _tType | _22 |
| _tType | _23 |
| _tType | _24 |
| _tType | _31 |
| _tType | _32 |
| _tType | _33 |
| _tType | _34 |
| _tType | _41 |
| _tType | _42 |
| _tType | _43 |
| _tType | _44 |
The base matrix template allowing any type of number to be used. Vectors are stored row-major.
Class CMatrix4x4Base Description: The base matrix template allowing any type of number to be used. Vectors are stored row-major.
| _tType LSE_FCALL lsm::CMatrix4x4Base< _tType, _tVector3Type, _tVector4Type >::Determ | ( | ) | const [inline] |
Get the determinant.
| LSVOID LSE_FCALL lsm::CMatrix4x4Base< _tType, _tVector3Type, _tVector4Type >::GetRow | ( | LSUINT32 | _ui32Row, |
| _tVector3Type & | _v3bRet | ||
| ) | const [inline] |
Get a row.
| _ui32Row | The row to get. |
| _v3bRet | Holds the returned row. |
| LSVOID LSE_FCALL lsm::CMatrix4x4Base< _tType, _tVector3Type, _tVector4Type >::GetRow | ( | LSUINT32 | _ui32Row, |
| _tVector4Type & | _v4bRet | ||
| ) | const [inline] |
Get a row.
| _ui32Row | The row to get. |
| _v4bRet | Holds the returned row. |
| LSVOID LSE_FCALL lsm::CMatrix4x4Base< _tType, _tVector3Type, _tVector4Type >::GetYawPitchRoll | ( | _tType & | _tYaw, |
| _tType & | _tPitch, | ||
| _tType & | _tRoll | ||
| ) | const [inline] |
Get the yaw, pitch, and roll from this matrix.
| _tYaw | Holds the returned yaw. |
| _tPitch | Holds the returned pitch. |
| _tRoll | Holds the returned roll. |
| CMatrix4x4Base<_tType, _tVector3Type, _tVector4Type>& LSE_FCALL lsm::CMatrix4x4Base< _tType, _tVector3Type, _tVector4Type >::Identity | ( | ) | [inline] |
Set the identity matrix in place.
| CMatrix4x4Base<_tType, _tVector3Type, _tVector4Type> LSE_FCALL lsm::CMatrix4x4Base< _tType, _tVector3Type, _tVector4Type >::Inverse | ( | ) | const [inline] |
Get the inverse of this matrix. Upon failure, the identity matrix is returned.
| CMatrix4x4Base<_tType, _tVector3Type, _tVector4Type>& LSE_FCALL lsm::CMatrix4x4Base< _tType, _tVector3Type, _tVector4Type >::MatrixRotationAxis | ( | _tType | _tX, |
| _tType | _tY, | ||
| _tType | _tZ, | ||
| _tType | _tAngle | ||
| ) | [inline] |
Create a matrix that rotates around an arbitrary axis.
| _tX | The X component of the arbitrary axis. |
| _tY | The Y component of the arbitrary axis. |
| _tZ | The Z component of the arbitrary axis. |
| _tAngle | Angle of rotation in radians. |
| CMatrix4x4Base<_tType, _tVector3Type, _tVector4Type>& LSE_FCALL lsm::CMatrix4x4Base< _tType, _tVector3Type, _tVector4Type >::MatrixRotationAxis | ( | const _tVector3Type & | _v3bAxis, |
| _tType | _tAngle | ||
| ) | [inline] |
Create a matrix that rotates around an arbitrary axis.
| _v3bAxis | The arbitrary axis. |
| _tAngle | Angle of rotation in radians. |
| CMatrix4x4Base<_tType, _tVector3Type, _tVector4Type>& LSE_FCALL lsm::CMatrix4x4Base< _tType, _tVector3Type, _tVector4Type >::MatrixRotationX | ( | _tType | _tAngle | ) | [inline] |
Builds a matrix that rotates around the X axis.
| _tAngle | Angle of rotation in radians. Angles are measured clockwise when looking along the rotation axis toward the origin. |
| CMatrix4x4Base<_tType, _tVector3Type, _tVector4Type>& LSE_FCALL lsm::CMatrix4x4Base< _tType, _tVector3Type, _tVector4Type >::MatrixRotationY | ( | _tType | _tAngle | ) | [inline] |
Builds a matrix that rotates around the Y axis.
| _tAngle | Angle of rotation in radians. Angles are measured clockwise when looking along the rotation axis toward the origin. |
| CMatrix4x4Base<_tType, _tVector3Type, _tVector4Type>& LSE_FCALL lsm::CMatrix4x4Base< _tType, _tVector3Type, _tVector4Type >::MatrixRotationYawPitchRoll | ( | _tType | _tYaw, |
| _tType | _tPitch, | ||
| _tType | _tRoll | ||
| ) | [inline] |
Builds a matrix that expresses a Euler rotation.
| _tYaw | Yaw around the Y axis, in radians. |
| _tPitch | Pitch around the X axis, in radians. |
| _tRoll | Roll around the Z axis, in radians. |
| CMatrix4x4Base<_tType, _tVector3Type, _tVector4Type>& LSE_FCALL lsm::CMatrix4x4Base< _tType, _tVector3Type, _tVector4Type >::MatrixRotationZ | ( | _tType | _tAngle | ) | [inline] |
Builds a matrix that rotates around the Z axis.
| _tAngle | Angle of rotation in radians. Angles are measured clockwise when looking along the rotation axis toward the origin. |
| CMatrix4x4Base<_tType, _tVector3Type, _tVector4Type>& LSE_FCALL lsm::CMatrix4x4Base< _tType, _tVector3Type, _tVector4Type >::MatrixScaling | ( | _tType | _tX, |
| _tType | _tY, | ||
| _tType | _tZ | ||
| ) | [inline] |
Create a matrix that represents the given scales.
| _tX | Scaling factor that is applied along the X axis. |
| _tY | Scaling factor that is applied along the Y axis. |
| _tZ | Scaling factor that is applied along the Z axis. |
| CMatrix4x4Base<_tType, _tVector3Type, _tVector4Type>& LSE_FCALL lsm::CMatrix4x4Base< _tType, _tVector3Type, _tVector4Type >::MatrixTranslation | ( | _tType | _tX, |
| _tType | _tY, | ||
| _tType | _tZ | ||
| ) | [inline] |
Create a matrix that represents the given position.
| _tX | X-coordinate offset. |
| _tY | Y-coordinate offset. |
| _tZ | Z-coordinate offset. |
| static _tVector3Type LSE_FCALL lsm::CMatrix4x4Base< _tType, _tVector3Type, _tVector4Type >::MultiplyVec3 | ( | const CMatrix4x4Base< _tType, _tVector3Type, _tVector4Type > & | _m44bMat, |
| const _tVector3Type & | _v3bIn | ||
| ) | [inline, static] |
Transforms vector (x, y, z, 1) by a given matrix.
| _m44bMat | The matrix by which to transform the given vector. |
| _v3bIn | The vector to transform. |
| static LSVOID LSE_FCALL lsm::CMatrix4x4Base< _tType, _tVector3Type, _tVector4Type >::MultiplyVec3Batch | ( | const CMatrix4x4Base< _tType, _tVector3Type, _tVector4Type > & | _m44bMat, |
| const _tVector3Type * | _pv3bIn, | ||
| LSUINT32 | _ui32Total, | ||
| _tVector3Type * | _pv3bOut | ||
| ) | [inline, static] |
Transforms a batch of vectors (x, y, z, 1) by a given matrix.
| _m44bMat | The matrix by which to transform the given vector. |
| _pv3bIn | The vectors to transform. |
| _ui32Total | Number of vectors to transform. |
| _pv3bOut | Holds the transformed vectors, which must not be the same as the input vector list. |
| static LSVOID LSE_FCALL lsm::CMatrix4x4Base< _tType, _tVector3Type, _tVector4Type >::MultiplyVec3BatchNormal | ( | const CMatrix4x4Base< _tType, _tVector3Type, _tVector4Type > & | _m44bMat, |
| const _tVector3Type * | _pv3bIn, | ||
| LSUINT32 | _ui32Total, | ||
| _tVector3Type * | _pv3bOut | ||
| ) | [inline, static] |
Transforms a batch of vectors (x, y, z) by a given matrix.
| _m44bMat | The matrix by which to transform the given vector. |
| _pv3bIn | The vectors to transform. |
| _ui32Total | Number of vectors to transform. |
| _pv3bOut | Holds the transformed vectors, which must not be the same as the input vector list. |
| static _tVector3Type LSE_FCALL lsm::CMatrix4x4Base< _tType, _tVector3Type, _tVector4Type >::MultiplyVec3Normal | ( | const CMatrix4x4Base< _tType, _tVector3Type, _tVector4Type > & | _m44bMat, |
| const _tVector3Type & | _v3bIn | ||
| ) | [inline, static] |
Transforms the 3D vector normal by the given matrix. If you want to transform a normal, the matrix you pass to this function should be the transpose of the inverse of the matrix you would use to transform a point.
| _m44bMat | The matrix by which to transform the given vector. |
| _v3bIn | The vector to transform. |
| static _tVector4Type LSE_FCALL lsm::CMatrix4x4Base< _tType, _tVector3Type, _tVector4Type >::MultiplyVec4 | ( | const CMatrix4x4Base< _tType, _tVector3Type, _tVector4Type > & | _m44bMat, |
| const _tVector4Type & | _v4bIn | ||
| ) | [inline, static] |
Transforms vector (x, y, z, w) by a given matrix.
| _m44bMat | The matrix by which to transform the given vector. |
| _v4bIn | The vector to transform. |
| static LSVOID LSE_FCALL lsm::CMatrix4x4Base< _tType, _tVector3Type, _tVector4Type >::MultiplyVec4Batch | ( | const CMatrix4x4Base< _tType, _tVector3Type, _tVector4Type > & | _m44bMat, |
| const _tVector4Type * | _pv4bIn, | ||
| LSUINT32 | _ui32Total, | ||
| _tVector4Type * | _pv4bOut | ||
| ) | [inline, static] |
Transforms a batch of vectors (x, y, z, w) by a given matrix.
| _m44bMat | The matrix by which to transform the given vector. |
| _pv4bIn | The vectors to transform. |
| _ui32Total | Number of vectors to transform. |
| _pv4bOut | Holds the transformed vectors, which must not be the same as the input vector list. |
| _tType LSE_FCALL lsm::CMatrix4x4Base< _tType, _tVector3Type, _tVector4Type >::operator() | ( | LSUINT32 | _ui32Row, |
| LSUINT32 | _ui32Col | ||
| ) | const [inline] |
Provides row/column access to the values in the matrix.
| _ui32Row | The row of the value to obtain. |
| _ui32Col | The column of the value to obtain. |
| _tType& LSE_FCALL lsm::CMatrix4x4Base< _tType, _tVector3Type, _tVector4Type >::operator() | ( | LSUINT32 | _ui32Row, |
| LSUINT32 | _ui32Col | ||
| ) | [inline] |
Provides row/column access to the values in the matrix.
| _ui32Row | The row of the value to obtain. |
| _ui32Col | The column of the value to obtain. |
| CMatrix4x4Base<_tType, _tVector3Type, _tVector4Type> LSE_FCALL lsm::CMatrix4x4Base< _tType, _tVector3Type, _tVector4Type >::operator* | ( | const CMatrix4x4Base< _tType, _tVector3Type, _tVector4Type > & | _mOther | ) | const [inline] |
Multiply this matrix with another, returning the result as M = this * _mOther.
| _mOther | The matrix by which to multiply this matrix. |
| _tVector3Type LSE_FCALL lsm::CMatrix4x4Base< _tType, _tVector3Type, _tVector4Type >::operator* | ( | const _tVector3Type & | _v3bOther | ) | const [inline] |
Multiply this matrix with a vector, returning the result as V = this * _v3bOther.
| _v3bOther | The vector to transform by this matrix. |
| CMatrix4x4Base<_tType, _tVector3Type, _tVector4Type>& LSE_FCALL lsm::CMatrix4x4Base< _tType, _tVector3Type, _tVector4Type >::operator= | ( | const CMatrix4x4Base< _tType, _tVector3Type, _tVector4Type > & | _mOther | ) | [inline] |
Assignment oerator.
| _mOther | The matrix to copy into this matrix object. |
| LSVOID LSE_FCALL lsm::CMatrix4x4Base< _tType, _tVector3Type, _tVector4Type >::OrthoOffCenterLH | ( | _tType | _tLeft, |
| _tType | _tRight, | ||
| _tType | _tBottom, | ||
| _tType | _tTop, | ||
| _tType | _tNear, | ||
| _tType | _tFar | ||
| ) | [inline] |
Create a customized, left-handed orthographic projection matrix.
| _tLeft | Minimum x-value of the view volume. |
| _tRight | Maximum x-value of the view volume. |
| _tBottom | Minimum y-value of the view volume. |
| _tTop | Maximum y-value of the view volume. |
| _tNear | Minimum z-value of the view volume. |
| _tFar | Maximum z-value of the view volume. |
| LSVOID LSE_FCALL lsm::CMatrix4x4Base< _tType, _tVector3Type, _tVector4Type >::OrthoOffCenterRH | ( | _tType | _tLeft, |
| _tType | _tRight, | ||
| _tType | _tBottom, | ||
| _tType | _tTop, | ||
| _tType | _tNear, | ||
| _tType | _tFar | ||
| ) | [inline] |
Create a customized, right-handed orthographic projection matrix.
| _tLeft | Minimum x-value of the view volume. |
| _tRight | Maximum x-value of the view volume. |
| _tBottom | Minimum y-value of the view volume. |
| _tTop | Maximum y-value of the view volume. |
| _tNear | Minimum z-value of the view volume. |
| _tFar | Maximum z-value of the view volume. |
| LSVOID LSE_FCALL lsm::CMatrix4x4Base< _tType, _tVector3Type, _tVector4Type >::PerspectiveFovRH | ( | _tType | _tFov, |
| _tType | _tAspect, | ||
| _tType | _tNear, | ||
| _tType | _tFar | ||
| ) | [inline] |
Create a right-handed perspective projection matrix based on a field of view.
| _tFov | Field of view in the y direction, in radians. |
| _tAspect | Aspect ratio, defined as view space width divided by height. |
| _tNear | Z-value of the near view-plane. |
| _tFar | Z-value of the far view-plane. |
| LSVOID LSE_FCALL lsm::CMatrix4x4Base< _tType, _tVector3Type, _tVector4Type >::PerspectiveFovRH | ( | _tType | _tFov, |
| _tType | _tAspect, | ||
| _tType | _tNear | ||
| ) | [inline] |
Create a right-handed perspective projection matrix based on a field of view. The far plane is at infinity.
| _tFov | Field of view in the y direction, in radians. |
| _tAspect | Aspect ratio, defined as view space width divided by height. |
| _tNear | Z-value of the near view-plane. |
| LSVOID LSE_FCALL lsm::CMatrix4x4Base< _tType, _tVector3Type, _tVector4Type >::Set | ( | _tType | _t11, |
| _tType | _t12, | ||
| _tType | _t13, | ||
| _tType | _t14, | ||
| _tType | _t21, | ||
| _tType | _t22, | ||
| _tType | _t23, | ||
| _tType | _t24, | ||
| _tType | _t31, | ||
| _tType | _t32, | ||
| _tType | _t33, | ||
| _tType | _t34, | ||
| _tType | _t41, | ||
| _tType | _t42, | ||
| _tType | _t43, | ||
| _tType | _t44 | ||
| ) | [inline] |
Set the matrix.
| _t11 | Component to set. |
| _t12 | Component to set. |
| _t13 | Component to set. |
| _t14 | Component to set. |
| _t21 | Component to set. |
| _t22 | Component to set. |
| _t23 | Component to set. |
| _t24 | Component to set. |
| _t31 | Component to set. |
| _t32 | Component to set. |
| _t33 | Component to set. |
| _t34 | Component to set. |
| _t41 | Component to set. |
| _t42 | Component to set. |
| _t43 | Component to set. |
| _t44 | Component to set. |
| LSVOID LSE_FCALL lsm::CMatrix4x4Base< _tType, _tVector3Type, _tVector4Type >::SetRow | ( | LSUINT32 | _ui32Row, |
| const _tVector4Type & | _v4bVec | ||
| ) | [inline] |
Set a row.
| _ui32Row | The row to set. |
| _v4bVec | The value to apply to the row. The 4th component of the row is not modified. |
| LSVOID LSE_FCALL lsm::CMatrix4x4Base< _tType, _tVector3Type, _tVector4Type >::SetRow | ( | LSUINT32 | _ui32Row, |
| const _tVector3Type & | _v3bVec | ||
| ) | [inline] |
Set a row.
| _ui32Row | The row to set. |
| _v3bVec | The value to apply to the row. The 4th component of the row is not modified. |
| CMatrix4x4Base<_tType, _tVector3Type, _tVector4Type>& LSE_FCALL lsm::CMatrix4x4Base< _tType, _tVector3Type, _tVector4Type >::Transpose | ( | ) | [inline] |
Transpose a matrix in place.
1.7.3