forked from teamnwah/openmw-tes3coop
Check if the bounding box changed before calling dirtyBound()
This commit is contained in:
parent
2b2a51d3b2
commit
eae35af13d
1 changed files with 8 additions and 5 deletions
|
@ -320,11 +320,14 @@ void RigGeometry::updateBounds(osg::NodeVisitor *nv)
|
|||
box.expandBy(bs);
|
||||
}
|
||||
|
||||
_boundingBox = box;
|
||||
_boundingSphere = osg::BoundingSphere(_boundingBox);
|
||||
_boundingSphereComputed = true;
|
||||
for (unsigned int i=0; i<getNumParents(); ++i)
|
||||
getParent(i)->dirtyBound();
|
||||
if (box != _boundingBox)
|
||||
{
|
||||
_boundingBox = box;
|
||||
_boundingSphere = osg::BoundingSphere(_boundingBox);
|
||||
_boundingSphereComputed = true;
|
||||
for (unsigned int i=0; i<getNumParents(); ++i)
|
||||
getParent(i)->dirtyBound();
|
||||
}
|
||||
}
|
||||
|
||||
void RigGeometry::updateGeomToSkelMatrix(const osg::NodePath& nodePath)
|
||||
|
|
Loading…
Reference in a new issue