D3DXMAMATRIXSHADOW function

xiaoxiao2021-03-06  78

D3DXMAMATRIXSHADOW function

Create a flat shadow matrix.

definition:

D3DXMAMATRIX * WINAPI D3DXMATRIXSHADOW

D3DXMAMATRIX * POUT,

Const D3DxVector4 * Plight,

Const D3DXPlane * PPLANE

);

parameter:

pout

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

PLight

[in] Pointing the light position vector of the D3DxVector4 structure.

PPLANE

[in] Points to the planar equation of the D3DXPLANE structure.

return value:

Point a matrix of the D3DXMatrix structure, which is used to put the geometry in a flat shadow transform matrix.

Description:

If the geometric object is illuminated from the light, the shadow conversion matrix can be calculated using a function D3DXMatrixHADOW.

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

Calculate this matrix with the following method:

P = Normalize (Plane);

L = Light;

D = DOT (p, l)

P.A * L.X D P.A * L.Y P.A * L.Z P.A * L.W

P.b * l.x p.b * l.y d p.b * l.z p.b * l.w

P.c * l.x p.c * L.Y P.c * L.Z D p.c * L.W

P.d * l.x p.d * L.Y P.D * L.Z P.D * L.W D

If the W component of the light is 0, it indicates the direction light emitted from the origin. If the W component is 1, it means it is a point source.

Function information:

HEADER

D3DX9Math.h

Import Library

D3DX9.LIB

Minimum operation systems

WINDOWS 98

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

New Post(0)