"L. Spiro Engine"
Public Member Functions | Static Public Member Functions | Public Attributes

lsm::CMatrix2x2Base< _tType, _tVector2Type > Class Template Reference

The base matrix template allowing any type of number to be used. More...

#include <LSMMatrix2x2Base.h>

List of all members.

Public Member Functions

LSE_CALLCTOR CMatrix2x2Base (const CMatrix2x2Base< _tType, _tVector2Type > &_m22bOther)
LSE_CALLCTOR CMatrix2x2Base (const CMatrix2x2Base< _tType, _tVector2Type > &_m22bOther, LSBOOL _bTranspose)
LSE_CALLCTOR CMatrix2x2Base (const _tType *_ptArray)
_tType &LSE_FCALL operator() (LSUINT32 _ui32Row, LSUINT32 _ui32Col)
_tType LSE_FCALL operator() (LSUINT32 _ui32Row, LSUINT32 _ui32Col) const
CMatrix2x2Base< _tType,
_tVector2Type > LSE_FCALL 
operator* (const CMatrix2x2Base< _tType, _tVector2Type > &_m22bOther) const
_tVector2Type LSE_FCALL operator* (const _tVector2Type &_v2bOther) const
CMatrix2x2Base< _tType,
_tVector2Type > LSE_FCALL 
operator* (_tType _tValue) const
CMatrix2x2Base< _tType,
_tVector2Type > &LSE_FCALL 
operator*= (_tType _tValue)
CMatrix2x2Base< _tType,
_tVector2Type > &LSE_FCALL 
operator+= (const CMatrix2x2Base< _tType, _tVector2Type > &_m22bOther)
CMatrix2x2Base< _tType,
_tVector2Type > &LSE_FCALL 
Identity ()
CMatrix2x2Base< _tType,
_tVector2Type > &LSE_FCALL 
Transpose ()
LSVOID LSE_FCALL SetRow (LSUINT32 _ui32Row, const _tVector2Type &_v3bVec)
CMatrix2x2Base< _tType,
_tVector2Type > &LSE_FCALL 
MatrixRotation (_tType _tAngle)
LSVOID LSE_FCALL MultiplyVec2ByMat2x2Transpose (const CMatrix2x2Base< _tType, _tVector2Type > &_m22bMat, const _tVector2Type &_v2bIn, _tVector2Type &_v2bOut)

Static Public Member Functions

static CMatrix2x2Base< _tType,
_tVector2Type > *LSE_FCALL 
MatrixMultiply (CMatrix2x2Base< _tType, _tVector2Type > &_m22bOut, const CMatrix2x2Base< _tType, _tVector2Type > &_m22bM1, const CMatrix2x2Base< _tType, _tVector2Type > &_m22bM2)
static LSVOID LSE_FCALL MultiplyVec2ByMat2x2 (const CMatrix2x2Base< _tType, _tVector2Type > &_m22bMat, const _tVector2Type &_v2bIn, _tVector2Type &_v2bOut)

Public Attributes

_tType _11
_tType _12
_tType _21
_tType _22

Detailed Description

template<typename _tType, typename _tVector2Type>
class lsm::CMatrix2x2Base< _tType, _tVector2Type >

The base matrix template allowing any type of number to be used.

Class CMatrix2x2Base Description: The base matrix template allowing any type of number to be used. Vectors are stored row-major.


Member Function Documentation

template<typename _tType, typename _tVector2Type>
CMatrix2x2Base<_tType, _tVector2Type>& LSE_FCALL lsm::CMatrix2x2Base< _tType, _tVector2Type >::Identity ( ) [inline]

Set the identity matrix in place.

Returns:
Returns this matrix.
template<typename _tType, typename _tVector2Type>
static CMatrix2x2Base<_tType, _tVector2Type>* LSE_FCALL lsm::CMatrix2x2Base< _tType, _tVector2Type >::MatrixMultiply ( CMatrix2x2Base< _tType, _tVector2Type > &  _m22bOut,
const CMatrix2x2Base< _tType, _tVector2Type > &  _m22bM1,
const CMatrix2x2Base< _tType, _tVector2Type > &  _m22bM2 
) [inline, static]

Multiply two matrices together. The result represents the transformation M1 followed by the transformation M2.

Parameters:
_m22bOutThe output matrix holding the result of the operation.
_m22bM1The left operand.
_m22bM2The right operand.
Returns:
Returns a pointer to _m22bOut.
template<typename _tType, typename _tVector2Type>
CMatrix2x2Base<_tType, _tVector2Type>& LSE_FCALL lsm::CMatrix2x2Base< _tType, _tVector2Type >::MatrixRotation ( _tType  _tAngle) [inline]

Build a rotation matrix.

Parameters:
_tAngleThe angle, in radians, of the rotation to apply to this matrix.
Returns:
Returns this matrix after the rotation matrix has been applied to it.
template<typename _tType, typename _tVector2Type>
static LSVOID LSE_FCALL lsm::CMatrix2x2Base< _tType, _tVector2Type >::MultiplyVec2ByMat2x2 ( const CMatrix2x2Base< _tType, _tVector2Type > &  _m22bMat,
const _tVector2Type &  _v2bIn,
_tVector2Type &  _v2bOut 
) [inline, static]

Transforms vector (x, y) by a given matrix. _v2bIn and _v2bOut must not be the same vectors.

Parameters:
_m22bMatThe matrix by which to transform the given vector.
_v2bInThe vector to transform.
_v2bOutThe resulting vector after the transformation has been applied.
template<typename _tType, typename _tVector2Type>
LSVOID LSE_FCALL lsm::CMatrix2x2Base< _tType, _tVector2Type >::MultiplyVec2ByMat2x2Transpose ( const CMatrix2x2Base< _tType, _tVector2Type > &  _m22bMat,
const _tVector2Type &  _v2bIn,
_tVector2Type &  _v2bOut 
) [inline]

Transforms vector (x, y) by the transpose of a given matrix. _v2bIn and _v2bOut must not be the same vectors.

Parameters:
_m22bMatThe matrix by which to transform the given vector.
_v2bInThe vector to transform.
_v2bOutThe resulting vector after the transformation has been applied.
template<typename _tType, typename _tVector2Type>
_tType LSE_FCALL lsm::CMatrix2x2Base< _tType, _tVector2Type >::operator() ( LSUINT32  _ui32Row,
LSUINT32  _ui32Col 
) const [inline]

Provides row/column access to the values in the matrix.

Parameters:
_ui32RowThe row of the value to obtain.
_ui32ColThe column of the value to obtain.
Returns:
Returns the value at the given row and column.
template<typename _tType, typename _tVector2Type>
_tType& LSE_FCALL lsm::CMatrix2x2Base< _tType, _tVector2Type >::operator() ( LSUINT32  _ui32Row,
LSUINT32  _ui32Col 
) [inline]

Provides row/column access to the values in the matrix.

Parameters:
_ui32RowThe row of the value to obtain.
_ui32ColThe column of the value to obtain.
Returns:
Returns a reference to the value at the given row and column. Can be used for reading or writing.
template<typename _tType, typename _tVector2Type>
_tVector2Type LSE_FCALL lsm::CMatrix2x2Base< _tType, _tVector2Type >::operator* ( const _tVector2Type &  _v2bOther) const [inline]

Multiply this matrix with a vector, returning the result as V = this * _v2bOther.

Parameters:
_v2bOtherThe vector to transform by this matrix.
Returns:
Returns the vector transformed by this matrix.
template<typename _tType, typename _tVector2Type>
CMatrix2x2Base<_tType, _tVector2Type> LSE_FCALL lsm::CMatrix2x2Base< _tType, _tVector2Type >::operator* ( _tType  _tValue) const [inline]

Multiply each component of the matrix by the given real.

Parameters:
_tValueThe real by which to multiply each component of this matrix.
Returns:
The result of the multiplication is returned.
template<typename _tType, typename _tVector2Type>
CMatrix2x2Base<_tType, _tVector2Type> LSE_FCALL lsm::CMatrix2x2Base< _tType, _tVector2Type >::operator* ( const CMatrix2x2Base< _tType, _tVector2Type > &  _m22bOther) const [inline]

Multiply this matrix with another, returning the result as M = this * _m22bOther.

Parameters:
_m22bOtherThe matrix by which to multiply this matrix.
Returns:
Returns the result of the matrix combination.
template<typename _tType, typename _tVector2Type>
CMatrix2x2Base<_tType, _tVector2Type>& LSE_FCALL lsm::CMatrix2x2Base< _tType, _tVector2Type >::operator*= ( _tType  _tValue) [inline]

Multiply each component of the matrix by the given real in-place.

Parameters:
_tValueThe real by which to multiply each component of this matrix.
Returns:
The result of the multiplication is returned.
template<typename _tType, typename _tVector2Type>
CMatrix2x2Base<_tType, _tVector2Type>& LSE_FCALL lsm::CMatrix2x2Base< _tType, _tVector2Type >::operator+= ( const CMatrix2x2Base< _tType, _tVector2Type > &  _m22bOther) [inline]

Performs a componentwise addition between this matrix and the given matrix.

Parameters:
_m22bOtherThe matrix by which each component is added.
Returns:
Returns this matrix.
template<typename _tType, typename _tVector2Type>
LSVOID LSE_FCALL lsm::CMatrix2x2Base< _tType, _tVector2Type >::SetRow ( LSUINT32  _ui32Row,
const _tVector2Type &  _v3bVec 
) [inline]

Set a row.

Parameters:
_ui32RowThe row to set.
_vRetThe value to apply to the row.
template<typename _tType, typename _tVector2Type>
CMatrix2x2Base<_tType, _tVector2Type>& LSE_FCALL lsm::CMatrix2x2Base< _tType, _tVector2Type >::Transpose ( ) [inline]

Transpose a matrix in place.

Returns:
Returns this matrix.

The documentation for this class was generated from the following file:
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator