mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-21 18:40:01 +00:00
Check if the bounding box changed before calling dirtyBound()
This commit is contained in:
parent
2b2a51d3b2
commit
eae35af13d
@ -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…
x
Reference in New Issue
Block a user