Microsoft DirectX 8.1 (C++) |
Builds a matrix that reflects the coordinate system about a plane.
D3DXMATRIX* D3DXMatrixReflect( D3DXMATRIX* pOut, CONST D3DXPLANE* pPlane );
Pointer to a D3DXMATRIX structure that reflects the coordinate system about the source plane.
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
Header: Declared in D3dx8math.h.
Import Library: Use D3dx8.lib.