D3DXMAMATRIXTRANSFORMATION function

xiaoxiao2021-03-06  77

D3DXMAMATRIXTRANSFORMATION function

Create a transformation matrix. If the parameter is set to NULL, it is treated as a unit matrix.

definition:

D3DXMAMATRIX * WINAPI D3DXMAMATRIXTRANSFORMATION

D3DXMAMATRIX * POUT,

Const d3dxvector3 * pscalingcenter,

Const d3dxquaternion * pscalingrotation,

Const d3dxvector3 * pscaling,

Const d3dxvector3 * Protationcenter,

Const d3dxquaternion * Protation,

Const d3dxvector3 * ptranslation

);

parameter:

pout

[IN, OUT] points to the operation result matrix of the D3DXMatrix structure.

PSCalingCenter

[in] Point to the zoom center point vector of the D3DXVECTOR3 structure. If null, the MSC matrix is ​​the unit matrix.

Pscalingrotation

[in] Points to the scaling and rotation of the D3DxQuaternion structure. If the parameter is NULL, the MSR matrix is ​​the unit matrix.

pscaling

[in] points to the zoom vector of the D3DXVECTOR3 structure. If the parameter is NULL, the MS matrix is ​​the unit matrix.

Protationcenter

[in] points to the center of rotation of the D3DxVector3 structure. If the parameter is NULL, the MRC matrix is ​​a unit matrix.

Protation

[in] Points the four-way group of rotation of the D3Dxquaternion structure. If the parameter is NULL, the MR matrix is ​​the unit matrix.

PTranslation

[in] Points to the D3DxVector3 structure. If the parameter is NULL, the MT matrix is ​​the unit matrix.

return value:

Point the transformation matrix of the D3DXMatrix structure. Matrix.

Description:

This function calculates the transform matrix with the following formula:

Mout = (msc) -1 * (msr) -1 * ms * msr * msc * (mrc) -1 * mr * mrc * MT

among them:

Mout = Output Matrix (Pout)

MSC = Zoom Center Matrix (PSCalingCenter)

MSR = Zoom Rotation Matrix (PSCALINGROTION)

MS = Zoom Matrix (pscaling)

MRC = rotary center matrix (ProtationCenter)

MR = Rotation Matrix (Protation)

MT = Ping Matrix (PTRANSLATION)

The function return value is the same as the POUT parameter. This allows the function D3DXMAMATRIXTRANSFORMATION to use parameters of other functions.

If it is a 2D transformation matrix, you must use a function D3DXMAMATRIXTRANSFORMATION2D.

Function information:

HEADER

D3DX9Math.h

Import Library

D3DX9.LIB

Minimum operation systems

WINDOWS 98

related functions:

D3DXMatrixaffineTransformation, Matrices

转载请注明原文地址:https://www.9cbs.com/read-108026.html

New Post(0)