XMPlaneFromPointNormal 函式 (directxmath.h)
計算從平面中的點和一般向量建構的平面方程式。
語法
XMVECTOR XM_CALLCONV XMPlaneFromPointNormal(
[in] FXMVECTOR Point,
[in] FXMVECTOR Normal
) noexcept;
參數
[in] Point
3D 向量,描述平面中的點。
[in] Normal
平面的 3D 向量標準。
傳回值
傳回向量,其元件是平面的係數 (A、B、C、D) 平面方程式
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;
.
備註
下列虛擬程式代碼示範函式的作業:
Ax+By+Cz+D=0
平臺需求
Microsoft Visual Studio 2010 或 Microsoft Visual Studio 2012 搭配 Windows SDK for Windows 8。 支援 Win32 傳統型應用程式、Windows 市集應用程式和 Windows Phone 8 個應用程式。規格需求
需求 | 值 |
---|---|
目標平台 | Windows |
標頭 | directxmath.h |