Plane.Transform(Matrix) Method (Microsoft.DirectX)

Transforms a plane by a matrix.

Definition

Visual Basic Public Sub Transform( _
    ByVal m As Matrix _
)
C# public void Transform(
    Matrix m
);
C++ public:
void Transform(
    Matrix m
);
JScript public function Transform(
    m : Matrix
);

Parameters

m Microsoft.DirectX.Matrix
Source Matrix structure, which contains the transformation values. This matrix must contain the inverse transpose of the transformation values.

Remarks

The input matrix is the inverse transpose of the actual transformation.

Examples

This C# code example transforms a plane by applying a non-uniform scale.

[C#]
Plane   planeNew;
Plane plane = new Plane(0, 1, 1, 0);
plane = Plane.Normalize(plane);

Matrix  matrix;
matrix = Matrix.Scaling(1.0f, 2.0f, 3.0f); 
matrix = Matrix.Invert(matrix);
matrix.Transpose(matrix);
planeNew = Plane.Transform(plane, matrix);

A plane is described by ax + by + cz + dw = 0. The first plane is created with (a, b, c, d) = (0, 1, 1, 0), which is a plane described by y + z = 0. After scaling, the new plane contains (a, b, c, d) = (0, 0.353f, 0.235f, 0), which shows the new plane to be described by 0.353y + 0.235z = 0. The parameter m contains the inverse transpose of the transformation matrix. The inverse transpose is required by this method so that the normal vector of the transformed plane can be correctly transformed as well.

See Also