本文整理汇总了C++中Bounds::getBox方法的典型用法代码示例。如果您正苦于以下问题:C++ Bounds::getBox方法的具体用法?C++ Bounds::getBox怎么用?C++ Bounds::getBox使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Bounds
的用法示例。
在下文中一共展示了Bounds::getBox方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: calculateMeshBounds
bool EditorUtility::calculateMeshBounds(const HSceneObject& object, AABox& bounds)
{
bounds = AABox(Vector3::ZERO, Vector3::ZERO);
if (object.isDestroyed())
return false;
bool foundOne = false;
const Vector<HComponent>& components = object->getComponents();
for (auto& component : components)
{
Bounds curBounds;
if (component->calculateBounds(curBounds))
{
if (!foundOne)
{
bounds = curBounds.getBox();
foundOne = true;
}
else
bounds.merge(curBounds.getBox());
}
else
{
if (!foundOne)
bounds = curBounds.getBox();
}
}
return foundOne;
}
示例2: internal_GetBounds
void ScriptMesh::internal_GetBounds(ScriptMesh* thisPtr, AABox* box, Sphere* sphere)
{
HMesh mesh = thisPtr->getHandle();
Bounds bounds = mesh->getProperties().getBounds();
*box = bounds.getBox();
*sphere = bounds.getSphere();
}