本文整理汇总了C++中BoundingSphere::expandBy方法的典型用法代码示例。如果您正苦于以下问题:C++ BoundingSphere::expandBy方法的具体用法?C++ BoundingSphere::expandBy怎么用?C++ BoundingSphere::expandBy使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BoundingSphere
的用法示例。
在下文中一共展示了BoundingSphere::expandBy方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: computeBound
BoundingSphere Patch::computeBound() const
{
BoundingSphere bsphere;
if (!_trile[0][0].valid())
return bsphere;
BoundingBox bb;
bb.init();
for (int res = 0; res < 2; ++res)
for (int i = 0; i < 4; ++i)
bb.expandBy(_trile[res][i]->getBoundingBox());
for (int strip = 0; strip < 4; ++strip)
for (int i = 0; i < 4; ++i)
bb.expandBy(_strip[strip][i]->getBoundingBox());
if (!bb.valid())
return bsphere;
bsphere.expandBy(bb);
return bsphere;
}
示例2: computeBound
BoundingSphere LOD::computeBound() const
{
if (_centerMode==USER_DEFINED_CENTER && _radius>=0.0f)
{
return BoundingSphere(_userDefinedCenter,_radius);
}
else if (_centerMode==UNION_OF_BOUNDING_SPHERE_AND_USER_DEFINED && _radius>=0.0f)
{
BoundingSphere bs = BoundingSphere(_userDefinedCenter,_radius);
bs.expandBy(Group::computeBound());
//alternative (used in TxpPagedLOD)
// bs.expandRadiusBy(Group::computeBound());
return bs;
}
else
{
return Group::computeBound();
}
}
示例3: computeBound
BoundingSphere Geode::computeBound() const
{
BoundingSphere bsphere;
_bbox.init();
DrawableList::const_iterator itr;
for(itr=_drawables.begin();
itr!=_drawables.end();
++itr)
{
_bbox.expandBy((*itr)->getBound());
}
if (_bbox.valid())
{
bsphere.expandBy(_bbox);
}
return bsphere;
}