From a196ea1d5d7834e251e9511349a30cede76de16d Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Fri, 7 May 2004 14:51:33 +0000 Subject: [PATCH] From Yefei Hi,fix to MultiSwitch set up, and adding of parsing of description fields (which is presently #if 0'd out while a compile problem is resolved.) --- src/osgPlugins/flt/flt2osg.cpp | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/src/osgPlugins/flt/flt2osg.cpp b/src/osgPlugins/flt/flt2osg.cpp index cd3724b5f..2c502dc16 100644 --- a/src/osgPlugins/flt/flt2osg.cpp +++ b/src/osgPlugins/flt/flt2osg.cpp @@ -1196,9 +1196,11 @@ osg::Group* ConvertFromFLT::visitSwitch(osg::Group& osgParent, SwitchRecord* rec // for each mask in the FLT Switch node for (int itMask=0; itMasknMasks; ++itMask) { + // I don't think we need to create a group node for each mask any more // create a osg group node - osg::ref_ptr group = new osg::Group; - osgSwitch->addChild( group.get() ); + //osg::ref_ptr group = new osg::Group; + //osgSwitch->addChild( group.get() ); + // for each child in the FLT Switch node for (unsigned int itChild=0; itChildsetActiveSwitchSet(pSSwitch->nCurrentMask); + osgSwitch->setActiveSwitchSet(pSSwitch->nCurrentMask); return osgSwitch; } @@ -1227,6 +1229,18 @@ osg::Group* ConvertFromFLT::visitObject(osg::Group& osgParent, ObjectRecord* rec visitPrimaryNode(*object, (PrimNodeRecord*)rec); _wObjTransparency = wPrevTransparency; +#if 0 +// submission from Yefei Hi, which alas doesn't compile due to missing +// _ultoa(,,) function. Will comment back in once flag is tracked down. + if ( pSObject->dwFlags & 0xFC000000) // some of the 6 defined flag bits are set + { + std::string desc("flt object flags: 0x"); + char cflags[33]; + + desc = desc + _ultoa( pSObject->dwFlags, cflags, 16 ); + object->getDescriptions().push_back( desc ); + } +#endif return object; }