Computes the equation of a plane constructed from a point in the plane and a normal vector.
XMVECTOR XMPlaneFromPointNormal(
XMVECTOR Point,
XMVECTOR Normal
)
Point
Type: XMVECTOR
3D vector describing a point in the plane.
Normal
Type: XMVECTOR
3D vector normal to the plane.
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;
.
The following pseudocode demonstrates the operation of the function:
Ax+By+Cz+D=0
Header: Declared in directxmath.h.