XMPlaneFromPointNormal

Computes the equation of a plane constructed from a point in the plane and a normal vector.

Syntax

XMVECTOR XMPlaneFromPointNormal(
         XMVECTOR Point,
         XMVECTOR Normal
)  

Parameters

Point
Type: XMVECTOR 

3D vector describing a point in the plane.

Normal
Type: XMVECTOR 

3D vector normal to the plane.

Return value

Type: XMVECTOR 

Returns a vector whose components are the coefficients of the plane (A, B, C, D) for the plane equation

XMVECTOR Result;

Result.x = Normal.x;
Result.y = Normal.y;
Result.z = Normal.z;
Result.w = -(Point.x * Normal.x + Point.y * Normal.y + Point.z * Normal.z);

return Result;  

.

Remarks

The following pseudocode demonstrates the operation of the function:
Ax+By+Cz+D=0

Requirements

Header: Declared in directxmath.h.