Changed the DatabasePager so that it bypasses the Registry::readNode() method and calls

readNodeImplementation() directly to avoid calling the KdTreeBuilder.   

Updated wrappers.
This commit is contained in:
Robert Osfield
2008-07-06 18:27:10 +00:00
parent 3965fe357b
commit c4e8d6ee42
14 changed files with 214 additions and 115 deletions

View File

@@ -227,6 +227,10 @@ class OSG_EXPORT KdTreeBuilder : public osg::NodeVisitor
KdTreeBuilder();
KdTreeBuilder(const KdTreeBuilder& rhs);
virtual KdTreeBuilder* clone() { return new KdTreeBuilder(*this); }
void apply(osg::Geode& geode);
KdTree::BuildOptions _buildOptions;

View File

@@ -104,6 +104,8 @@ class OSGDB_EXPORT DatabasePager : public osg::NodeVisitor::DatabaseRequestHandl
virtual void run();
osg::ref_ptr<osg::Node> dpReadRefNodeFile(const std::string& fileName,const ReaderWriter::Options* options);
protected:
virtual ~DatabaseThread();

View File

@@ -320,7 +320,8 @@ class OSGDB_EXPORT Registry : public osg::Referenced
if (doKdTreeBuilder && _kdTreeBuilder.valid() && result.validNode())
{
result.getNode()->accept(*_kdTreeBuilder);
osg::ref_ptr<osg::KdTreeBuilder> builder = _kdTreeBuilder->clone();
result.getNode()->accept(*builder);
}
}