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

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

Definition

Visual Basic Public Sub Reflect( _
    ByVal plane As Plane _
)
C# public void Reflect(
    Plane plane
);
C++ public:
void Reflect(
    Plane plane
);
JScript public function Reflect(
    plane : Plane
);

Parameters

plane Microsoft.DirectX.Plane
Source Plane structure.

Remarks

The Reflect method normalizes the plane equation before it creates the reflected matrix.

The method 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