D3DXMatrixReflect
Microsoft DirectX 9.0 SDK Update (October 2004)

D3DXMatrixReflect Function


Builds a matrix that reflects the coordinate system about a plane.

Syntax

D3DXMATRIX *WINAPI D3DXMatrixReflect(      

    D3DXMATRIX *pOut,     CONST D3DXPLANE *pPlane );

Parameters

pOut
[in, out] Pointer to the D3DXMATRIX structure that is the result of the operation.
pPlane
[in] Pointer to the source D3DXPLANE structure.

Return Value

Pointer to a D3DXMATRIX structure that reflects the coordinate system about the source plane.



Remarks

This function normalizes the plane equation before it creates the reflected matrix.

The return value for this function is the same value returned in the pOut parameter. In this way, the D3DXMatrixReflect function can be used as a parameter for another function.

This function uses the following formula to compute the returned matrix.

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

Headerd3dx9math.h
Import libraryd3dx9.lib
Minimum operating systems Windows 98


© 2004 Microsoft Corporation. All rights reserved.
Feedback? Please provide us with your comments on this topic.
For more help, visit the DirectX Developer Center.