Function directx_math::XMPlaneFromPointNormal[][src]

pub fn XMPlaneFromPointNormal(Point: FXMVECTOR, Normal: FXMVECTOR) -> XMVECTOR

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

Parameters

Point 3D vector describing a point in the plane.

Normal 3D vector normal to the plane.

Return value

Returns a vector whose components are the coefficients of the plane (A, B, C, D) for the plane equation Ax+By+Cz+D=0.

Remarks

The following pseudocode demonstrates the operation of the function:

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;

Reference

https://docs.microsoft.com/en-us/windows/win32/api/directxmath/nf-directxmath-XMPlaneFromPointNormal