D3DXMatrixReflect function

xiaoxiao2021-03-06  80

D3DXMatrixReflect function

Create a flat reflection matrix from the planar equation.

definition:

D3DXMAMATRIX * WINAPI D3DXMATRIXREFLECT

D3DXMAMATRIX * POUT,

Const D3DXPlane * PPLANE

);

parameter:

pout

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

PPLANE

[in] points to the planar equation coefficient of the D3DXPLANE structure.

return value:

Point a flat reflection matrix of the D3DXMatrix structure.

Description:

This function is first specified in the coefficient of the flat equation, and then create the reflection matrix of the planar equation.

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

This function calculates a flat reflection matrix with the following formula:

P = Normalize (Plane);

-2 * p.a * p.a 1 -2 * p.b * p.a -2 * p.c * p.a 0

-2 * p.a * p.b -2 * p.b * p.b 1 -2 * p.c * p.b 0

-2 * p.a * p.c -2 * p.b * p.c -2 * p.c * p.c 1 0

-2 * p.a * p.d -2 * p.b * p.d -2 * p.c * p.d 1

Function information:

HEADER

D3DX9Math.h

Import Library

D3DX9.LIB

Minimum operation systems

WINDOWS 98

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

New Post(0)