From daef76ec0bf2254ae2bfa61db81b17ace73c1c7e Mon Sep 17 00:00:00 2001 From: mfranz Date: Fri, 25 Apr 2008 08:41:29 +0000 Subject: [PATCH] Till BUSCH: "tim recently noticed the database pager was repeatedly loading and unloading the same objects. he also tracked down the problem to missing bounding sphere information in osgDB::PagedLOD. this is a simplicistic approach to fix this: SGPagedLOD will now remember whatever value it sees for getBound() after loading a child. this patch will make database pager run much calmer." --- simgear/scene/model/SGPagedLOD.cxx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/simgear/scene/model/SGPagedLOD.cxx b/simgear/scene/model/SGPagedLOD.cxx index ee68b499..bdd19c9c 100644 --- a/simgear/scene/model/SGPagedLOD.cxx +++ b/simgear/scene/model/SGPagedLOD.cxx @@ -47,6 +47,8 @@ bool SGPagedLOD::addChild(osg::Node *child) if (!PagedLOD::addChild(child)) return false; + setRadius(getBound().radius()); + setCenter(getBound().center()); // if the model was an .xml-file it will have UserData set osg::ref_ptr d = dynamic_cast(child->getUserData()); if (d.valid()) -- 2.39.5