From a5dd1951fc052bd03263a6e7d227c069e0bb11e2 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Thu, 22 Jan 2004 11:33:40 +0000 Subject: [PATCH] Added back in handling of non seam children in seam subgraphs, now uses a seperate group to enclose both the seam and the non seam children. --- src/osgPlugins/txp/ReaderWriterTXP.cpp | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/src/osgPlugins/txp/ReaderWriterTXP.cpp b/src/osgPlugins/txp/ReaderWriterTXP.cpp index f720b4bab..2dba9d9e6 100644 --- a/src/osgPlugins/txp/ReaderWriterTXP.cpp +++ b/src/osgPlugins/txp/ReaderWriterTXP.cpp @@ -344,13 +344,21 @@ osg::Node* SeamFinder::seamReplacement(osg::Node* node) seam->addChild(hiRes->getChild(0)); // high res } - if (nonSeamChildren.size()) + if (nonSeamChildren.empty()) { - std::cout<<"Alert *** need to place in a seperate osg::Group NOT the TXPSeamLOD"<addChild(nonSeamChildren[i]); + return seam; + } + else + { + osg::Group* newGroup = new osg::Group; + + newGroup->addChild(seam); + + for (unsigned int i = 0; i < nonSeamChildren.size(); i++) + newGroup->addChild(nonSeamChildren[i]); + + return newGroup; } - return seam; } return node;