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