XMPlaneIntersectLine 函数 (directxmath.h)

查找平面和线条之间的交集。

语法

XMVECTOR XM_CALLCONV XMPlaneIntersectLine(
  [in] FXMVECTOR P,
  [in] FXMVECTOR LinePoint1,
  [in] FXMVECTOR LinePoint2
) noexcept;

参数

[in] P

描述平面公式Ax+By+Cz+D=0的平面系数的 XMVECTOR (A、B、C、D) 。

[in] LinePoint1

描述行上第一个点的 3D 向量。

[in] LinePoint2

描述行上第二个点的 3D 向量。

返回值

返回平面 PLinePoint1 和 LinePoint2 定义的 线条的交集。 如果线条与平面平行,则返回的向量的所有分量都等于 QNaN。

注解

平台要求

Microsoft Visual Studio 2010 或 Microsoft Visual Studio 2012 与 Windows 8 Windows SDK。 支持 Win32 桌面应用、Windows 应用商店应用和 Windows Phone 8 应用。

要求

要求
目标平台 Windows
标头 directxmath.h

另请参阅

DirectXMath 库平面函数