Gateware Libraries  R6.5A
Beta Build
GW::MATH::GMatrix Class Referenceabstract

Matrix functions. More...

#include <GMatrix.h>

Inheritance diagram for GW::MATH::GMatrix:
Collaboration diagram for GW::MATH::GMatrix:

Public Member Functions

virtual GReturn AddMatrixF (GMATRIXF _matrix1, GMATRIXF _matrix2, GMATRIXF &_outMatrix)=0
 Add two specified matirxs. More...
 
virtual GReturn SubtractMatrixF (GMATRIXF _matrix1, GMATRIXF _matrix2, GMATRIXF &_outMatrix)=0
 Subtract two specified matirxs. More...
 
virtual GReturn MultiplyMatrixF (GMATRIXF _matrix1, GMATRIXF _matrix2, GMATRIXF &_outMatrix)=0
 Multiply two specified matirxs. More...
 
virtual GReturn VectorXMatrixF (GMATRIXF _matrix, GVECTORF _vector, GVECTORF &_outVector)=0
 Multiply the specified matrix by the specified vector. More...
 
virtual GReturn ConvertQuaternionF (GQUATERNIONF _quaternion, GMATRIXF &_outMatrix)=0
 Convert the specified quaternion to a matrix. More...
 
virtual GReturn MultiplyNumF (GMATRIXF _matrix, float _scalar, GMATRIXF &_outMatrix)=0
 Scale the matrix. More...
 
virtual GReturn DeterminantF (GMATRIXF _matrix, float &_outValue)=0
 Calculate the determinant of the specified matirx. More...
 
virtual GReturn TransposeF (GMATRIXF _matrix, GMATRIXF &_outMatrix)=0
 Transpose the specified matirx. More...
 
virtual GReturn InverseF (GMATRIXF _matrix, GMATRIXF &_outMatrix)=0
 Inverse the specified matirx. More...
 
virtual GReturn IdentityF (GMATRIXF &_outMatrix)=0
 Identity the specified matrix. More...
 
virtual GReturn GetRotationF (GMATRIXF _matrix, GQUATERNIONF &_outQuaternion)=0
 Get the quaternion which represents the roataion of the specified matrix. More...
 
virtual GReturn GetTranslationF (GMATRIXF _matrix, GVECTORF &_outMatrix)=0
 Get the translation matrix from the specified matrix. More...
 
virtual GReturn GetScaleF (GMATRIXF _matrix, GVECTORF &_outMatrix)=0
 Get the scaling matrix from the specified matrix. More...
 
virtual GReturn RotationXF (GMATRIXF _matrix, float _radian, GMATRIXF &_outMatrix)=0
 Roatate the specified matrix around the x-axis by multiplying a left-handed rotation matrix. More...
 
virtual GReturn RotationYF (GMATRIXF _matrix, float _radian, GMATRIXF &_outMatrix)=0
 Roatate the specified matrix around the y-axis by multiplying a left-handed rotation matrix. More...
 
virtual GReturn RotationZF (GMATRIXF _matrix, float _radian, GMATRIXF &_outMatrix)=0
 Roatate the specified matrix around the z-axis by multiplying a left-handed rotation matrix. More...
 
virtual GReturn RotationYawPitchRollF (float _yaw, float _pitch, float _roll, GMATRIXF &_outMatrix)=0
 Builds a matrix based on specified yaw, pitch, and roll angles in radian. More...
 
virtual GReturn RotationByVectorF (GVECTORF _vector, float _radian, GMATRIXF &_outMatrix)=0
 Builds a rotation matrix based on specified vector and an angle in radian. More...
 
virtual GReturn TranslatelocalF (GMATRIXF _matrix, GVECTORF _vector, GMATRIXF &_outMatrix)=0
 Translate the matrix by the specified vector. More...
 
virtual GReturn ScalingF (GMATRIXF _matrix, GVECTORF _vector, GMATRIXF &_outMatirx)=0
 Scale the matrix by the specified vector. More...
 
virtual GReturn LerpF (GMATRIXF _matrix1, GMATRIXF _matrix2, float _ratio, GMATRIXF &_outMatrix)=0
 Linearly interpolates between two matrices. More...
 
virtual GReturn ProjectionLHF (float _fovY, float _aspect, float _zn, float _zf, GMATRIXF &_outMatrix)=0
 Builds a left-handed perspective matrix. More...
 
virtual GReturn LookAtLHF (GVECTORF _eye, GVECTORF _at, GVECTORF _up, GMATRIXF &_outMatrix)=0
 Builds a left-handed view matrix. More...
 
virtual GReturn AddMatrixD (GMATRIXD _matrix1, GMATRIXD _matrix2, GMATRIXD &_outMatrix)=0
 Add two specified matirxs. More...
 
virtual GReturn SubtractMatrixD (GMATRIXD _matrix1, GMATRIXD _matrix2, GMATRIXD &_outMatrix)=0
 Subtract two specified matirxs. More...
 
virtual GReturn MultiplyMatrixD (GMATRIXD _matrix1, GMATRIXD _matrix2, GMATRIXD &_outMatrix)=0
 Multiply two specified matirxs. More...
 
virtual GReturn VectorXMatrixD (GMATRIXD _matrix, GVECTORD _vector, GVECTORD &_outVector)=0
 Multiply the specified matrix by the specified vector. More...
 
virtual GReturn ConvertQuaternionD (GQUATERNIOND _quaternion, GMATRIXD &_outMatrix)=0
 Convert the specified quaternion to a matrix. More...
 
virtual GReturn MultiplyNumD (GMATRIXD _matrix, double _scalar, GMATRIXD &_outMatrix)=0
 Scale the matrix. More...
 
virtual GReturn DeterminantD (GMATRIXD _matrix, double &_outValue)=0
 Calculate the determinant of the specified matirx. More...
 
virtual GReturn TransposeD (GMATRIXD _matrix, GMATRIXD &_outMatrix)=0
 Transpose the specified matirx. More...
 
virtual GReturn InverseD (GMATRIXD _matrix, GMATRIXD &_outMatrix)=0
 Inverse the specified matirx. More...
 
virtual GReturn IdentityD (GMATRIXD &_outMatrix)=0
 Identity the specified matrix. More...
 
virtual GReturn GetRotationD (GMATRIXD _matrix, GQUATERNIOND &_outQuaternion)=0
 Get the quaternion which represents the roataion of the specified matrix. More...
 
virtual GReturn GetTranslationD (GMATRIXD _matrix, GVECTORD &_outMatrix)=0
 Get the translation matrix from the specified matrix. More...
 
virtual GReturn GetScaleD (GMATRIXD _matrix, GVECTORD &_outMatrix)=0
 Get the scaling matrix from the specified matrix. More...
 
virtual GReturn RotationXD (GMATRIXD _matrix, double _radian, GMATRIXD &_outMatrix)=0
 Roatate the specified matrix around the x-axis by multiplying a left-handed rotation matrix. More...
 
virtual GReturn RotationYD (GMATRIXD _matrix, double _radian, GMATRIXD &_outMatrix)=0
 Roatate the specified matrix around the y-axis by multiplying a left-handed rotation matrix. More...
 
virtual GReturn RotationZD (GMATRIXD _matrix, double _radian, GMATRIXD &_outMatrix)=0
 Roatate the specified matrix around the z-axis by multiplying a left-handed rotation matrix. More...
 
virtual GReturn RotationYawPitchRollD (double _yaw, double _pitch, double _roll, GMATRIXD &_outMatrix)=0
 Builds a matrix based on specified yaw, pitch, and roll angles in radian. More...
 
virtual GReturn RotationByVectorD (GVECTORD _vector, double _radian, GMATRIXD &_outMatrix)=0
 Builds a rotation matrix based on specified vector and an angle in radian. More...
 
virtual GReturn TranslatelocalD (GMATRIXD _matrix, GVECTORD _vector, GMATRIXD &_outMatrix)=0
 Translate the matrix by the specified vector. More...
 
virtual GReturn ScalingD (GMATRIXD _matrix, GVECTORD _vector, GMATRIXD &_outMatrix)=0
 Scale the matrix by the specified vector. More...
 
virtual GReturn LerpD (GMATRIXD _matrix1, GMATRIXD _matrix2, double _ratio, GMATRIXD &_outMatrix)=0
 Linearly interpolates between two matrices. More...
 
virtual GReturn ProjectionLHD (double _fovY, double _aspect, double _zn, double _zf, GMATRIXD &_outMatrix)=0
 Builds a left-handed perspective matrix. More...
 
virtual GReturn LookAtLHD (GVECTORD _eye, GVECTORD _at, GVECTORD _up, GMATRIXD &_outMatrix)=0
 Builds a left-handed view matrix. More...
 
- Public Member Functions inherited from GW::CORE::GInterface
virtual GReturn GetCount (unsigned int &_outCount)=0
 Return the total number of active references to this object. More...
 
virtual GReturn IncrementCount ()=0
 Increase the total number of active references to this object. More...
 
virtual GReturn DecrementCount ()=0
 Decrease the total number of active references to this object. More...
 
virtual GReturn RequestInterface (const GUUIID &_interfaceID, void **_outputInterface)=0
 Requests an interface that may or may not be supported by this object. More...
 

Detailed Description

Matrix functions.

Include float vector and double matrix's functions

Member Function Documentation

◆ AddMatrixD()

virtual GReturn GW::MATH::GMatrix::AddMatrixD ( GMATRIXD  _matrix1,
GMATRIXD  _matrix2,
GMATRIXD _outMatrix 
)
pure virtual

Add two specified matirxs.

Adds the two specified matirxs and stores the result in the output matirx.

Parameters
[in]_matrix1The first matrix
[in]_matrix2The second matrix
[out]_outVectorThe result of addition
Return values
SUCCESSThe calculation succeed

◆ AddMatrixF()

virtual GReturn GW::MATH::GMatrix::AddMatrixF ( GMATRIXF  _matrix1,
GMATRIXF  _matrix2,
GMATRIXF _outMatrix 
)
pure virtual

Add two specified matirxs.

Adds the two specified matirxs and stores the result in the output matirx.

Parameters
[in]_matrix1The first matrix
[in]_matrix2The second matrix
[out]_outVectorThe result of addition
Return values
SUCCESSThe calculation succeed

◆ ConvertQuaternionD()

virtual GReturn GW::MATH::GMatrix::ConvertQuaternionD ( GQUATERNIOND  _quaternion,
GMATRIXD _outMatrix 
)
pure virtual

Convert the specified quaternion to a matrix.

Converts the specified quaternion to a matrix and stores the result in the output matrix.

Parameters
[in]_quaternionThe specified quaternion
[out]_outMatrixThe result of the convert
Return values
SUCCESSThe calculation succeed

◆ ConvertQuaternionF()

virtual GReturn GW::MATH::GMatrix::ConvertQuaternionF ( GQUATERNIONF  _quaternion,
GMATRIXF _outMatrix 
)
pure virtual

Convert the specified quaternion to a matrix.

Converts the specified quaternion to a matrix and stores the result in the output matrix.

Parameters
[in]_quaternionThe specified quaternion
[out]_outMatrixThe result of the convert
Return values
SUCCESSThe calculation succeed

◆ DeterminantD()

virtual GReturn GW::MATH::GMatrix::DeterminantD ( GMATRIXD  _matrix,
double &  _outValue 
)
pure virtual

Calculate the determinant of the specified matirx.

Calculates the determinant of the specified matirx and stores the result in the output matrix.

Parameters
[in]_matrixThe specified matirx
[out]_outValueThe result of the determinant
Return values
SUCCESSThe calculation succeed

◆ DeterminantF()

virtual GReturn GW::MATH::GMatrix::DeterminantF ( GMATRIXF  _matrix,
float &  _outValue 
)
pure virtual

Calculate the determinant of the specified matirx.

Calculates the determinant of the specified matirx and stores the result in the output value.

Parameters
[in]_matrixThe specified matirx
[out]_outValueThe result of the determinant
Return values
SUCCESSThe calculation succeed

◆ GetRotationD()

virtual GReturn GW::MATH::GMatrix::GetRotationD ( GMATRIXD  _matrix,
GQUATERNIOND _outQuaternion 
)
pure virtual

Get the quaternion which represents the roataion of the specified matrix.

Get the quaternion which represents the roataion of the specified matrix and stores the result in the output quaternion.

Parameters
[in]_matrixThe specified matrix
[out]_quaternionThe quaternion of the specified matirx
Return values
SUCCESSThe calculation succeed
FAILUREThe calculation failed

◆ GetRotationF()

virtual GReturn GW::MATH::GMatrix::GetRotationF ( GMATRIXF  _matrix,
GQUATERNIONF _outQuaternion 
)
pure virtual

Get the quaternion which represents the roataion of the specified matrix.

Get the quaternion which represents the roataion of the specified matrix and stores the result in the output quaternion.

Parameters
[in]_matrixThe specified matrix
[out]_quaternionThe quaternion of the specified matirx
Return values
SUCCESSThe calculation succeed
FAILUREThe calculation failed

◆ GetScaleD()

virtual GReturn GW::MATH::GMatrix::GetScaleD ( GMATRIXD  _matrix,
GVECTORD _outMatrix 
)
pure virtual

Get the scaling matrix from the specified matrix.

Gets the scaling matrix from the specified matrix and stores the result in the output matrix.

Parameters
[in]_matrixThe specified matrix
[out]_outMatrixThe scaling matirx of the specified matirx
Return values
SUCCESSThe calculation succeed

◆ GetScaleF()

virtual GReturn GW::MATH::GMatrix::GetScaleF ( GMATRIXF  _matrix,
GVECTORF _outMatrix 
)
pure virtual

Get the scaling matrix from the specified matrix.

Gets the scaling matrix from the specified matrix and stores the result in the output matrix.

Parameters
[in]_matrixThe specified matrix
[out]_outMatrixThe scaling matirx of the specified matirx
Return values
SUCCESSThe calculation succeed

◆ GetTranslationD()

virtual GReturn GW::MATH::GMatrix::GetTranslationD ( GMATRIXD  _matrix,
GVECTORD _outMatrix 
)
pure virtual

Get the translation matrix from the specified matrix.

Gets the translation matrix from the specified matrix and stores the result in the output matrix.

Parameters
[in]_matrixThe specified matrix
[out]_outMatrixThe translation matirx of the specified matirx
Return values
SUCCESSThe calculation succee

◆ GetTranslationF()

virtual GReturn GW::MATH::GMatrix::GetTranslationF ( GMATRIXF  _matrix,
GVECTORF _outMatrix 
)
pure virtual

Get the translation matrix from the specified matrix.

Gets the translation matrix from the specified matrix and stores the result in the output matrix.

Parameters
[in]_matrixThe specified matrix
[out]_outMatrixThe translation matirx of the specified matirx
Return values
SUCCESSThe calculation succeed

◆ IdentityD()

virtual GReturn GW::MATH::GMatrix::IdentityD ( GMATRIXD _outMatrix)
pure virtual

Identity the specified matrix.

Set the output matrix as an identity matrix

Parameters
[out]_outMatrixThe result of the identity
Return values
SUCCESSThe calculation succeed

◆ IdentityF()

virtual GReturn GW::MATH::GMatrix::IdentityF ( GMATRIXF _outMatrix)
pure virtual

Identity the specified matrix.

Set the output matrix as an identity matrix

Parameters
[out]_outMatrixThe result of the identity
Return values
SUCCESSThe calculation succeed

◆ InverseD()

virtual GReturn GW::MATH::GMatrix::InverseD ( GMATRIXD  _matrix,
GMATRIXD _outMatrix 
)
pure virtual

Inverse the specified matirx.

Inverses the specified matirx and stores the result in the output matrix.

Parameters
[in]_matrixThe specified matirx
[out]_outMatrixThe result of the inverse
Return values
SUCCESSThe calculation succeed
FAILUREThe calculation failed

◆ InverseF()

virtual GReturn GW::MATH::GMatrix::InverseF ( GMATRIXF  _matrix,
GMATRIXF _outMatrix 
)
pure virtual

Inverse the specified matirx.

Inverses the specified matirx and stores the result in the output matrix.

Parameters
[in]_matrixThe specified matirx
[out]_outMatrixThe result of the inverse
Return values
SUCCESSThe calculation succeed
FAILUREThe calculation failed

◆ LerpD()

virtual GReturn GW::MATH::GMatrix::LerpD ( GMATRIXD  _matrix1,
GMATRIXD  _matrix2,
double  _ratio,
GMATRIXD _outMatrix 
)
pure virtual

Linearly interpolates between two matrices.

Linearly interpolates between two matrices and stores the result in the output matrix.

Parameters
[in]_matrixThe first matrix
[in]_matrixThe second matrix
[in]_ratioThe interpolation coefficient
[out]_outMatrixThe result of the scaling
Return values
SUCCESSThe calculation succeed

◆ LerpF()

virtual GReturn GW::MATH::GMatrix::LerpF ( GMATRIXF  _matrix1,
GMATRIXF  _matrix2,
float  _ratio,
GMATRIXF _outMatrix 
)
pure virtual

Linearly interpolates between two matrices.

Linearly interpolates between two matrices and stores the result in the output matrix.

Parameters
[in]_matrixThe first matrix
[in]_matrixThe second matrix
[in]_ratioThe interpolation coefficient
[out]_outMatrixThe result of the scaling
Return values
SUCCESSThe calculation succeed

◆ LookAtLHD()

virtual GReturn GW::MATH::GMatrix::LookAtLHD ( GVECTORD  _eye,
GVECTORD  _at,
GVECTORD  _up,
GMATRIXD _outMatrix 
)
pure virtual

Builds a left-handed view matrix.

Builds a left-handed view matrix

Parameters
[in]_eyeThe position of eye
[in]_atThe position of the camera look-at target
[in]_outThe direction of the world's up
[out]_outMatrixThe result of the look-at matrix
Return values
SUCCESSThe building succeed
FAILUREThe building failed

◆ LookAtLHF()

virtual GReturn GW::MATH::GMatrix::LookAtLHF ( GVECTORF  _eye,
GVECTORF  _at,
GVECTORF  _up,
GMATRIXF _outMatrix 
)
pure virtual

Builds a left-handed view matrix.

Builds a left-handed view matrix

Parameters
[in]_eyeThe position of eye
[in]_atThe position of the camera look-at target
[in]_outThe direction of the world's up
[out]_outMatrixThe result of the look-at matrix
Return values
SUCCESSThe building succeed
FAILUREThe building failed

◆ MultiplyMatrixD()

virtual GReturn GW::MATH::GMatrix::MultiplyMatrixD ( GMATRIXD  _matrix1,
GMATRIXD  _matrix2,
GMATRIXD _outMatrix 
)
pure virtual

Multiply two specified matirxs.

Multiplies the two specified matirxs and stores the result in the output matirx.

Parameters
[in]_matrix1The first matrix
[in]_matrix2The second matrix
[out]_outVectorThe result of Multiplication
Return values
SUCCESSThe calculation succeed

◆ MultiplyMatrixF()

virtual GReturn GW::MATH::GMatrix::MultiplyMatrixF ( GMATRIXF  _matrix1,
GMATRIXF  _matrix2,
GMATRIXF _outMatrix 
)
pure virtual

Multiply two specified matirxs.

Multiplies the two specified matirxs and stores the result in the output matirx.

Parameters
[in]_matrix1The first matrix
[in]_matrix2The second matrix
[out]_outVectorThe result of Multiplication
Return values
SUCCESSThe calculation succeed

◆ MultiplyNumD()

virtual GReturn GW::MATH::GMatrix::MultiplyNumD ( GMATRIXD  _matrix,
double  _scalar,
GMATRIXD _outMatrix 
)
pure virtual

Scale the matrix.

Scales the specified matrix with a number and stores the result in the output matrix.

Parameters
[in]_matrixThe matirx
[in]_scalarThe specified value to scale
[out]_outMatrixThe result of the scaling
Return values
SUCCESSThe calculation succeed

◆ MultiplyNumF()

virtual GReturn GW::MATH::GMatrix::MultiplyNumF ( GMATRIXF  _matrix,
float  _scalar,
GMATRIXF _outMatrix 
)
pure virtual

Scale the matrix.

Scales the specified matrix with a number and stores the result in the output matrix.

Parameters
[in]_matrixThe matirx
[in]_scalarThe specified value to scale
[out]_outMatrixThe result of the scaling
Return values
SUCCESSThe calculation succeed

◆ ProjectionLHD()

virtual GReturn GW::MATH::GMatrix::ProjectionLHD ( double  _fovY,
double  _aspect,
double  _zn,
double  _zf,
GMATRIXD _outMatrix 
)
pure virtual

Builds a left-handed perspective matrix.

Builds a left-handed perspective matrix

Parameters
[in]_fieldOfViewField of view in the y direction, in radians
[in]_aspectAspect ratio, defined as view space width divided by height
[in]_znZ-value of the near view-plane
[in]_zfZ-value of the far view-plane
[out]_outMatrixThe result of the projection matrix
Return values
SUCCESSThe building succeed

◆ ProjectionLHF()

virtual GReturn GW::MATH::GMatrix::ProjectionLHF ( float  _fovY,
float  _aspect,
float  _zn,
float  _zf,
GMATRIXF _outMatrix 
)
pure virtual

Builds a left-handed perspective matrix.

Builds a left-handed perspective matrix

Parameters
[in]_fieldOfViewField of view in the y direction, in radians
[in]_aspectAspect ratio, defined as view space width divided by height
[in]_znZ-value of the near view-plane
[in]_zfZ-value of the far view-plane
[out]_outMatrixThe result of the projection matrix
Return values
SUCCESSThe building succeed
FAILUREThe building failed

◆ RotationByVectorD()

virtual GReturn GW::MATH::GMatrix::RotationByVectorD ( GVECTORD  _vector,
double  _radian,
GMATRIXD _outMatrix 
)
pure virtual

Builds a rotation matrix based on specified vector and an angle in radian.

Builds a matrix that rotates around a specified axis. Angles are measured clockwise when looking along the rotation axis toward the origin.

Parameters
[in]_vectorVector describing the axis of rotation.
[in]_radianAngle of rotation around the vector, in radians.
[out]_outMatrixThe result of the rotation
Return values
SUCCESSThe building succeed

◆ RotationByVectorF()

virtual GReturn GW::MATH::GMatrix::RotationByVectorF ( GVECTORF  _vector,
float  _radian,
GMATRIXF _outMatrix 
)
pure virtual

Builds a rotation matrix based on specified vector and an angle in radian.

Builds a matrix that rotates around a specified axis. Angles are measured clockwise when looking along the rotation axis toward the origin.

Parameters
[in]_vectorVector describing the axis of rotation.
[in]_radianAngle of rotation around the vector, in radians.
[out]_outMatrixThe result of the rotation
Return values
SUCCESSThe building succeed
FAILUREThe building failed

◆ RotationXD()

virtual GReturn GW::MATH::GMatrix::RotationXD ( GMATRIXD  _matrix,
double  _radian,
GMATRIXD _outMatrix 
)
pure virtual

Roatate the specified matrix around the x-axis by multiplying a left-handed rotation matrix.

Roatate the specified matrix around the x-axis by multiplying a left-handed rotation matrix and stores the result in the output matrix. Angles are measured clockwise when looking along the rotation axis toward the origin.

Parameters
[in]_matrixThe specified matrix
[in]_radianThe radian to rotate
[out]_outMatrixThe result of the rotation
Return values
SUCCESSThe calculation succeed

◆ RotationXF()

virtual GReturn GW::MATH::GMatrix::RotationXF ( GMATRIXF  _matrix,
float  _radian,
GMATRIXF _outMatrix 
)
pure virtual

Roatate the specified matrix around the x-axis by multiplying a left-handed rotation matrix.

Roatate the specified matrix around the x-axis by multiplying a left-handed rotation matrix and stores the result in the output matrix. Angles are measured clockwise when looking along the rotation axis toward the origin.

Parameters
[in]_matrixThe specified matrix
[in]_radianThe radian to rotate
[out]_outMatrixThe result of the rotation
Return values
SUCCESSThe calculation succeed

◆ RotationYawPitchRollD()

virtual GReturn GW::MATH::GMatrix::RotationYawPitchRollD ( double  _yaw,
double  _pitch,
double  _roll,
GMATRIXD _outMatrix 
)
pure virtual

Builds a matrix based on specified yaw, pitch, and roll angles in radian.

Uses Left-handed coordinate system to build the rotation matrix. Angles are measured clockwise when looking along the rotation axis toward the origin. The mathematic formula will like: YawPitchRoll_RotationMatrix = ( Mat_Roll * ( Mat_Pitch * Mat_Yaw))

Parameters
[in]_yawAngle of rotation around the y-axis, in radians.
[in]_pitchAngle of rotation around the x-axis, in radians.
[in]_rollAngle of rotation around the z-axis, in radians.
[out]_outMatrixThe result of the rotation
Return values
SUCCESSThe building succeed

◆ RotationYawPitchRollF()

virtual GReturn GW::MATH::GMatrix::RotationYawPitchRollF ( float  _yaw,
float  _pitch,
float  _roll,
GMATRIXF _outMatrix 
)
pure virtual

Builds a matrix based on specified yaw, pitch, and roll angles in radian.

Uses Left-handed coordinate system to build the rotation matrix. Angles are measured clockwise when looking along the rotation axis toward the origin. The mathematic formula will like: YawPitchRoll_RotationMatrix = ( Mat_Roll * ( Mat_Pitch * Mat_Yaw))

Parameters
[in]_yawAngle of rotation around the y-axis, in radians.
[in]_pitchAngle of rotation around the x-axis, in radians.
[in]_rollAngle of rotation around the z-axis, in radians.
[out]_outMatrixThe result of the rotation
Return values
SUCCESSThe building succeed

◆ RotationYD()

virtual GReturn GW::MATH::GMatrix::RotationYD ( GMATRIXD  _matrix,
double  _radian,
GMATRIXD _outMatrix 
)
pure virtual

Roatate the specified matrix around the y-axis by multiplying a left-handed rotation matrix.

Roatate the specified matrix around the y-axis by multiplying a left-handed rotation matrix and stores the result in the output matrix. Angles are measured clockwise when looking along the rotation axis toward the origin.

Parameters
[in]_matrixThe specified matrix
[in]_radianThe radian to rotate
[out]_outMatrixThe result of the rotation
Return values
SUCCESSThe calculation succeed

◆ RotationYF()

virtual GReturn GW::MATH::GMatrix::RotationYF ( GMATRIXF  _matrix,
float  _radian,
GMATRIXF _outMatrix 
)
pure virtual

Roatate the specified matrix around the y-axis by multiplying a left-handed rotation matrix.

Roatate the specified matrix around the y-axis by multiplying a left-handed rotation matrix and stores the result in the output matrix. Angles are measured clockwise when looking along the rotation axis toward the origin.

Parameters
[in]_matrixThe specified matrix
[in]_radianThe radian to rotate
[out]_outMatrixThe result of the rotation
Return values
SUCCESSThe calculation succeed

◆ RotationZD()

virtual GReturn GW::MATH::GMatrix::RotationZD ( GMATRIXD  _matrix,
double  _radian,
GMATRIXD _outMatrix 
)
pure virtual

Roatate the specified matrix around the z-axis by multiplying a left-handed rotation matrix.

Roatate the specified matrix around the z-axis by multiplying a left-handed rotation matrix and stores the result in the output matrix. Angles are measured clockwise when looking along the rotation axis toward the origin.

Parameters
[in]_matrixThe specified matrix
[in]_radianThe radian to rotate
[out]_outMatrixThe result of the rotation
Return values
SUCCESSThe calculation succeed

◆ RotationZF()

virtual GReturn GW::MATH::GMatrix::RotationZF ( GMATRIXF  _matrix,
float  _radian,
GMATRIXF _outMatrix 
)
pure virtual

Roatate the specified matrix around the z-axis by multiplying a left-handed rotation matrix.

Roatate the specified matrix around the z-axis by multiplying a left-handed rotation matrix and stores the result in the output matrix. Angles are measured clockwise when looking along the rotation axis toward the origin.

Parameters
[in]_matrixThe specified matrix
[in]_radianThe radian to rotate
[out]_outMatrixThe result of the rotation
Return values
SUCCESSThe calculation succeed

◆ ScalingD()

virtual GReturn GW::MATH::GMatrix::ScalingD ( GMATRIXD  _matrix,
GVECTORD  _vector,
GMATRIXD _outMatrix 
)
pure virtual

Scale the matrix by the specified vector.

Scales the matrix by the specified vector and stores the result in the output matrix.

Parameters
[in]_matrixThe specified matrix
[in]_vectorThe vector to scale
[out]_outMatrixThe result of the scaling
Return values
SUCCESSThe calculation succeed

◆ ScalingF()

virtual GReturn GW::MATH::GMatrix::ScalingF ( GMATRIXF  _matrix,
GVECTORF  _vector,
GMATRIXF _outMatirx 
)
pure virtual

Scale the matrix by the specified vector.

Scales the matrix by the specified vector and stores the result in the output matrix.

Parameters
[in]_matrixThe specified matrix
[in]_vectorThe vector to scale
[out]_outMatrixThe result of the scaling
Return values
SUCCESSThe calculation succeed

◆ SubtractMatrixD()

virtual GReturn GW::MATH::GMatrix::SubtractMatrixD ( GMATRIXD  _matrix1,
GMATRIXD  _matrix2,
GMATRIXD _outMatrix 
)
pure virtual

Subtract two specified matirxs.

Subtracts the two specified matirxs and stores the result in the output matirx.

Parameters
[in]_matrix1The first matrix
[in]_matrix2The second matrix
[out]_outVectorThe result of subtraction
Return values
SUCCESSThe calculation succeed

◆ SubtractMatrixF()

virtual GReturn GW::MATH::GMatrix::SubtractMatrixF ( GMATRIXF  _matrix1,
GMATRIXF  _matrix2,
GMATRIXF _outMatrix 
)
pure virtual

Subtract two specified matirxs.

Subtracts the two specified matirxs and stores the result in the output matirx.

Parameters
[in]_matrix1The first matrix
[in]_matrix2The second matrix
[out]_outVectorThe result of subtraction
Return values
SUCCESSThe calculation succeed

◆ TranslatelocalD()

virtual GReturn GW::MATH::GMatrix::TranslatelocalD ( GMATRIXD  _matrix,
GVECTORD  _vector,
GMATRIXD _outMatrix 
)
pure virtual

Translate the matrix by the specified vector.

Translates the matrix by the specified vector and stores the result in the output matrix. The translation values along the x, y and z axes.

Parameters
[in]_matrixThe specified matrix
[in]_vectorThe vector to translate
[out]_outMatrixThe result of the trasnlation
Return values
SUCCESSThe calculation succeed
FAILUREThe calculation failed

◆ TranslatelocalF()

virtual GReturn GW::MATH::GMatrix::TranslatelocalF ( GMATRIXF  _matrix,
GVECTORF  _vector,
GMATRIXF _outMatrix 
)
pure virtual

Translate the matrix by the specified vector.

Translates the matrix by the specified vector and stores the result in the output matrix. The translation values along the x, y and z axes.

Parameters
[in]_matrixThe specified matrix
[in]_vectorThe vector to translate
[out]_outMatrixThe result of the trasnlation
Return values
SUCCESSThe calculation succeed

◆ TransposeD()

virtual GReturn GW::MATH::GMatrix::TransposeD ( GMATRIXD  _matrix,
GMATRIXD _outMatrix 
)
pure virtual

Transpose the specified matirx.

Transposes the specified matirx and stores the result in the output matrix.

Parameters
[in]_matrixThe specified matirx
[out]_outMatrixThe result of the transpose
Return values
SUCCESSThe calculation succeed

◆ TransposeF()

virtual GReturn GW::MATH::GMatrix::TransposeF ( GMATRIXF  _matrix,
GMATRIXF _outMatrix 
)
pure virtual

Transpose the specified matirx.

Transposes the specified matirx and stores the result in the output matrix.

Parameters
[in]_matrixThe specified matirx
[out]_outMatrixThe result of the transpose
Return values
SUCCESSThe calculation succeed

◆ VectorXMatrixD()

virtual GReturn GW::MATH::GMatrix::VectorXMatrixD ( GMATRIXD  _matrix,
GVECTORD  _vector,
GVECTORD _outVector 
)
pure virtual

Multiply the specified matrix by the specified vector.

Multiplies the specified matrix by the specified vector and stores the result in the output vector. The input vectors' w value will be returned with 0.

Parameters
[in]_matrixThe input matrix
[in]_vectorThe input vector
[out]_outVectorThe result of multiplicataion
Return values
SUCCESSThe calculation succeed

◆ VectorXMatrixF()

virtual GReturn GW::MATH::GMatrix::VectorXMatrixF ( GMATRIXF  _matrix,
GVECTORF  _vector,
GVECTORF _outVector 
)
pure virtual

Multiply the specified matrix by the specified vector.

Multiplies the specified matrix by the specified vector and stores the result in the output vector. The input vectors' w value will be returned with 0.

Parameters
[in]_matrixThe input matrix
[in]_vectorThe input vector
[out]_outVectorThe result of multiplicataion
Return values
SUCCESSThe calculation succeed

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