D3DXPlaneNormalize 仅 returns 归一化平面还是对其进行修改?
D3DXPlaneNormalize only returns the normalized plane or also modifies it?
我是一名大学生,我对 directx 中的一个函数有一点疑问。我正在尝试应用平截头体剔除,我需要平截头体平面的法线。
我使用 D3DXPLANE 和 D3DXPlaneNormalize 函数来获取法线,但我还需要平面常量来检查对象是否在平截头体中。
那个函数只是 returns 规范化的平面还是它也修改了它们?
大多数遗留 D3DXMath 函数 return 为方便起见指向输入结构之一的指针。如 MSDN 文档页面所述:
D3DXPLANE* D3DXPlaneNormalize(
_Inout_ D3DXPLANE *pOut,
_In_ const D3DXPLANE *pP
);
The return value for this function is the same value returned in the pOut parameter. In this way, this function can be used as a parameter for another function.
请注意,D3DX9、D3DX10 和 D3DX11 均已弃用。因此,D3DXMath 也已弃用。旧版 DirectX SDK 本身也已弃用。参见 MSDN: Where is the DirectX SDK?, Living without D3DX, and Introducing DirectXMath
我是一名大学生,我对 directx 中的一个函数有一点疑问。我正在尝试应用平截头体剔除,我需要平截头体平面的法线。
我使用 D3DXPLANE 和 D3DXPlaneNormalize 函数来获取法线,但我还需要平面常量来检查对象是否在平截头体中。
那个函数只是 returns 规范化的平面还是它也修改了它们?
大多数遗留 D3DXMath 函数 return 为方便起见指向输入结构之一的指针。如 MSDN 文档页面所述:
D3DXPLANE* D3DXPlaneNormalize(
_Inout_ D3DXPLANE *pOut,
_In_ const D3DXPLANE *pP
);
The return value for this function is the same value returned in the pOut parameter. In this way, this function can be used as a parameter for another function.
请注意,D3DX9、D3DX10 和 D3DX11 均已弃用。因此,D3DXMath 也已弃用。旧版 DirectX SDK 本身也已弃用。参见 MSDN: Where is the DirectX SDK?, Living without D3DX, and Introducing DirectXMath