XMPlaneEqual 函数 (directxmath.h)

确定两个平面是否相等。

语法

bool XM_CALLCONV XMPlaneEqual(
  [in] FXMVECTOR P1,
  [in] FXMVECTOR P2
) noexcept;

参数

[in] P1

描述平面方程的平面系数 (A、B、C、D) 的 XMVECTOR

return (P1.x == P2.x && P1.y == P2.y && P1.z == P2.z && P1.w == P2.w);

.

[in] P2

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

返回值

如果两个平面相等,则返回 true,否则返回 false。

备注

以下伪代码演示函数的操作。

Ax+By+Cz+D=0

平台要求

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

要求

   
目标平台 Windows
标头 directxmath.h

另请参阅

DirectXMath 库平面函数