XMPlaneIntersectLine

Finds the intersection between a plane and a line.

Syntax

XMVECTOR XMPlaneIntersectLine(
         XMVECTOR P,
         XMVECTOR LinePoint1,
         XMVECTOR LinePoint2
)  

Parameters

P
Type: XMVECTOR 

XMVECTOR describing the plane coefficients (A, B, C, D) for the plane equation Ax+By+Cz+D=0.

LinePoint1
Type: XMVECTOR 

3D vector describing the first point on the line.

LinePoint2
Type: XMVECTOR 

3D vector describing the second point on the line.

Return value

Type: XMVECTOR 

Returns the intersection of the plane P and the line defined by LinePoint1 and LinePoint2. If the line is parallel to the plane, all components of the returned vector are equal to QNaN.

Requirements

Header: Declared in directxmath.h.