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);
|
box.expandBy(bs);
|
||||||
}
|
}
|
||||||
|
|
||||||
_boundingBox = box;
|
if (box != _boundingBox)
|
||||||
_boundingSphere = osg::BoundingSphere(_boundingBox);
|
{
|
||||||
_boundingSphereComputed = true;
|
_boundingBox = box;
|
||||||
for (unsigned int i=0; i<getNumParents(); ++i)
|
_boundingSphere = osg::BoundingSphere(_boundingBox);
|
||||||
getParent(i)->dirtyBound();
|
_boundingSphereComputed = true;
|
||||||
|
for (unsigned int i=0; i<getNumParents(); ++i)
|
||||||
|
getParent(i)->dirtyBound();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void RigGeometry::updateGeomToSkelMatrix(const osg::NodePath& nodePath)
|
void RigGeometry::updateGeomToSkelMatrix(const osg::NodePath& nodePath)
|
||||||
|
|
Loading…
Reference in a new issue