D3DXMAMATRIXLOKATRH function

xiaoxiao2021-03-06  68

D3DXMAMATRIXLOKATRH function

Create a right hand coordinate system observation matrix.

definition:

D3DXMAMATRIX * WINAPI D3DXMATRIXLOOKATRH (

D3DXMAMATRIX * POUT,

Const d3dxvector3 * peye,

Const D3DxVector3 * Pat,

Const D3DxVector3 * Pup

);

parameter:

pout

[IN, OUT] points to the matrix of returning results of the D3DXMatrix structure.

peye

[in] Point all the eyes of the D3DxVector3 structure all in position vectors. This value will be used to translate.

PAT

[in] Points the camera to observe the target position vector to the camera of the D3DxVector3 structure.

PUP

[in] Points to the current world coordinate system of D3DXVECTOR3 structure. Usually used in [0, 1, 0].

return value:

Point to the left hand coordinate system observation matrix of the D3DXMAMATRIX structure.

Description:

The return value is the same as the parameter Pout returned. By this way, the D3DxMatrixLookaTRH function can be a parameter of other functions.

This function calculates the returned matrix with the following formula:

ZAXIS = NORMAL (Eye - AT)

XAXIS = Normal (Cross (Up, ZAXIS))

Yaxis = Cross (ZAXIS, XAXIS)

Xaxis.x yaxis.x zaxis.x 0

Xaxis.y yaxis.y zaxis.y 0

Xaxis.z yaxis.z zaxis.z 0

-dot (Xaxis, Eye) -dot (Yaxis, Eye) -dot (ZAXIS, EYE) 1

Function information:

HEADER

D3DX9Math.h

Import Library

D3DX9.LIB

Minimum operation systems

WINDOWS 98

related functions:

D3DXMAMATRIXLOKATLH

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

New Post(0)