Added computeDataVariance method into osg::Object and implementations in Drawable and StateSet,

and calling of osgUtil::StaticObjectDetectionVisitor in osgViewer::Viewer
This commit is contained in:
Robert Osfield
2007-02-14 11:24:42 +00:00
parent 5dcb7af6a4
commit 89c99a88fa
256 changed files with 503 additions and 393 deletions

View File

@@ -294,6 +294,19 @@ Drawable::~Drawable()
dirtyDisplayList();
}
void Drawable::computeDataVariance()
{
bool dynamic = false;
if (getUpdateCallback() ||
getEventCallback() ||
getCullCallback())
{
dynamic = true;
}
setDataVariance(dynamic ? DYNAMIC : STATIC);
}
void Drawable::addParent(osg::Node* node)
{
_parents.push_back(node);