XMComparisonAnyOutOfBounds 函数 (directxmath.h)
测试比较值以确定任何比较组件是否在设置边界之外。
bool XMComparisonAnyOutOfBounds(
[in] uint32_t CR
) noexcept;
[in] CR
要测试的比较值。 通常使用 DirectXMath 函数的录制版本(如 XMVectorInBoundsR)检索比较值。 记录函数的名称以“R”结尾。
如果任何比较的组件超出设置的边界,则返回 true。
以下代码片段重点介绍了如何使用此函数:
uint32_t comparisonValue = XMVectorInBoundsR( V, Bounds );
if( XMComparisonAnyOutOfBounds( comparisonValue ) )
{
DoStuff();
}
仅当 V 的四个组件中至少有一个位于由 Bounds 和 -Bounds 确定的卷之外时,才会调用函数。DoStuff
目标平台 | Windows |
标头 | directxmath.h |