Plane.Transform Method |
Language: |
Transforms a plane by a matrix.
public void Transform(Matrix); public static Plane Transform(Plane, Matrix);
The input matrix is the inverse transpose of the actual transformation.
This C# code example transforms a plane by applying a non-uniform scale.[C#]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.
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);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.
Send comments about this topic to Microsoft. © Microsoft Corporation. All rights reserved.
Feedback? Please provide us with your comments on this topic.
For more help, visit the DirectX Developer Center