26 #ifdef G4VIS_BUILD_OI_DRIVER 33 #include <Inventor/nodes/SoNode.h> 34 #include <Inventor/elements/SoSwitchElement.h> 35 #include <Inventor/elements/SoCoordinateElement.h> 87 #include <Inventor/nodes/SoNode.h> 88 #include <Inventor/nodes/SoGroup.h> 89 #include <Inventor/nodes/SoCoordinate3.h> 95 #define IF_CLASS(aClass) \ 96 if(aNode->isOfType(aClass::getClassTypeId())) {\ 98 aClass* node = (aClass*)aNode;\ 99 if(This->fGenerate==TRUE) {\ 100 if(node->alternateRep.getValue()==NULL) {\ 101 node->generateAlternateRep();\ 103 SoNode* altRep = node->alternateRep.getValue();\ 104 if((altRep!=NULL) && altRep->isOfType(SoGroup::getClassTypeId()))\ 105 altRep->doAction(This);\ 109 SoNode* altRep = node->alternateRep.getValue();\ 110 if((altRep!=NULL) && altRep->isOfType(SoGroup::getClassTypeId()))\ 111 altRep->doAction(This);\ 113 node->clearAlternateRep();\ 136 else if(aNode->isOfType(SoGroup::getClassTypeId())) {
137 aNode->doAction(aThis);
139 else if(aNode->isOfType(SoCoordinate3::getClassTypeId())) {
140 aNode->doAction(aThis);
143 else if(aNode->getField(
"alternateRep")!=NULL) {
144 aNode->doAction(aThis);
SbBool getGenerate() const
static void initClass(void)
virtual ~SoAlternateRepAction()
static void nodeAction(SoAction *, SoNode *)