From: frohlich Date: Sun, 1 Mar 2009 21:31:18 +0000 (+0000) Subject: Crude hack to work around my today introduced collision tree sharing problem. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=7f534a796644f73612853b5ce8962ec08e1cef9c;p=simgear.git Crude hack to work around my today introduced collision tree sharing problem. Modified Files: simgear/scene/model/ModelRegistry.cxx --- diff --git a/simgear/scene/model/ModelRegistry.cxx b/simgear/scene/model/ModelRegistry.cxx index 29789816..1d587c2b 100644 --- a/simgear/scene/model/ModelRegistry.cxx +++ b/simgear/scene/model/ModelRegistry.cxx @@ -396,6 +396,13 @@ osg::Node* OptimizeModelPolicy::optimize(osg::Node* node, osg::Node* DefaultCopyPolicy::copy(osg::Node* model, const string& fileName, const osgDB::ReaderWriter::Options* opt) { + /// Crude hack for the bounding volume sharing problem. + /// Better solution this week. + /// Note that this does not really build in the case we come here + /// the second time for the same node + BoundingVolumeBuildVisitor bvBuilder; + model->accept(bvBuilder); + // Add an extra reference to the model stored in the database. // That it to avoid expiring the object from the cache even if it is still // in use. Note that the object cache will think that a model is unused