D3DXPLANETRANSFORM function
Transform the plane with a matrix. The matrix input is a transposed matrix of an inverse matrix.
definition:
D3DXPLANE * WINAPI D3DXPLANETRANSFORM
D3DXPLANE * Pout,
Const D3DXPlane * PP,
Const D3DXMatrix * PM
);
parameter:
pout
[IN, OUT] points to the plane equation after transformation of the D3DXPLANE structure.
PP
[in] The structure of D3DXPLANE is the planar equation that will be converted with a matrix, but it is specified before transform, as shown in the example below.
pm
[in] The matrix of the D3DXMatrix structure is directed, and the matrix is a transposed matrix of the inverse matrix.
return value:
Point to the conversion of the D3DXPLANE structure,
The function return value is the same as the POUT parameter. This allows the function D3DXPLANETRANSFORM to use parameters of other functions.
example:
This example uses a non-equivalent zoom plane:
D3DXPLANE PLANENEW;
D3DXPLANE PLANE (0, 1, 1, 0); // plane.
D3DXPLANENORMALIZE (& Plane, & Plane); // Valigers.
D3DXMAMATRIX Matrix;
D3DXMatrixscaling (& Matrix, 1.0F, 2.0F, 3.0F); //
D3DXMAMATRIXINVERSE (& Matrix, null, & matrix);
D3DXMAMATRIXTRANSPOSE (& Matrix, & Matrix);
D3DXPLANETRANSFORM (& PlanenEw, & Plane, & Matrix);
The planar equation is AX BY CZ DW = 0, so the plane coefficient is (A, B, C, D) = (0, 1, 1, 0), so the planar equation is Y Z = 0. After scaling, the planar equation coefficient is (A, B, C, D) = (0, 0.353F, 0.235F, 0), so the planar equation is 0.353Y 0.235z = 0.
The parameter PM is a reverse matrix transposition, and the flat coefficient is a regularization, and this function can be calculated correctly.
Function information:
HEADER
D3DX9Math.h
Import Library
D3DX9.LIB
Minimum operation systems
WINDOWS 98
related functions:
D3DXPLANENORMALIZE, D3DXMATRIXROTIONX, D3DXMATRIXROTIONY, D3DXMATRIXROTIONZ, D3DXMATRIXINVERSE, D3DXMATRIXTRANSPOSE