From Ulrich Hertlien, fix for new changes in osg::Switch interface.

Small clean to changes by Robert.
This commit is contained in:
Robert Osfield
2002-12-10 20:26:56 +00:00
parent 530b85c807
commit 442fa34aaa
2 changed files with 7 additions and 3 deletions

View File

@@ -225,6 +225,7 @@ osg::Node* ConvertFromPerformer::visitSwitch(osg::Group* osgParent,pfSwitch* swi
}
osgSwitch = new osg::Switch;
osgSwitch->setAllChildrenOff();
if (osgParent) osgParent->addChild(osgSwitch);
registerPfObjectForOsgObject(switchNode,osgSwitch);
@@ -235,15 +236,15 @@ osg::Node* ConvertFromPerformer::visitSwitch(osg::Group* osgParent,pfSwitch* swi
float val = switchNode->getVal();
if (val==PFSWITCH_ON)
{
osgSwitch->setValue(osg::Switch::ALL_CHILDREN_ON);
osgSwitch->setAllChildrenOn();
}
else if (val==PFSWITCH_OFF)
{
osgSwitch->setValue(osg::Switch::ALL_CHILDREN_OFF);
osgSwitch->setAllChildrenOff();
}
else
{
osgSwitch->setValue((int)val);
osgSwitch->setSingleChildOn((unsigned int)val);
}
for(int i=0;i<switchNode->getNumChildren();++i)

View File

@@ -8,6 +8,9 @@ CXXFILES =\
LIBS += $(OSG_LIBS) $(PF_XTRA_LIBS) $(OTHER_LIBS)
# Performer libs must be compiled -O on Linux
DBGF += -O
TARGET_BASENAME = pfb
include $(TOPDIR)/Make/cygwin_plugin_def
PLUGIN = $(PLUGIN_PREFIX)$(TARGET_BASENAME).$(PLUGIN_EXT)