Introduce TerrainSystem node which decorates a complete terrain model made up of Terrain tiles.

This commit is contained in:
Robert Osfield
2008-03-26 20:06:54 +00:00
parent c9fc0cd802
commit a9d283ca73
12 changed files with 239 additions and 57 deletions

View File

@@ -732,6 +732,22 @@ void DatabasePager::run()
_changeAutoUnRef, _valueAutoUnRef,
_changeAnisotropy, _valueAnisotropy,
_drawablePolicy, this);
// push the soon to be parent on the nodepath of the NodeVisitor so that
// during traversal one can test for where it'll be in the overall scene graph
osg::NodePathList nodePathList = databaseRequest->_groupForAddingLoadedSubgraph->getParentalNodePaths();
if (!nodePathList.empty())
{
osg::NodePath& nodePath = nodePathList.front();
for(osg::NodePath::iterator nitr = nodePath.begin();
nitr != nodePath.end();
++nitr)
{
frov.pushOntoNodePath(*nitr);
}
}
frov.pushOntoNodePath(databaseRequest->_groupForAddingLoadedSubgraph.get());
databaseRequest->_loadedModel->accept(frov);