26#ifdef G4VIS_BUILD_OI_DRIVER
33#include <Inventor/nodes/SoNode.h>
34#include <Inventor/elements/SoSwitchElement.h>
35#include <Inventor/elements/SoCoordinateElement.h>
45 static bool first =
true;
53 SO_ACTION_ADD_METHOD(SoNode,nodeAction);
79 fGenerate = aGenerate;
91#include <Inventor/nodes/SoNode.h>
92#include <Inventor/nodes/SoGroup.h>
93#include <Inventor/nodes/SoCoordinate3.h>
99#define IF_CLASS(aClass) \
100 if(aNode->isOfType(aClass::getClassTypeId())) {\
102 aClass* node = (aClass*)aNode;\
103 if(This->fGenerate==TRUE) {\
104 if(node->alternateRep.getValue()==NULL) {\
105 node->generateAlternateRep();\
107 SoNode* altRep = node->alternateRep.getValue();\
108 if((altRep!=NULL) && altRep->isOfType(SoGroup::getClassTypeId()))\
109 altRep->doAction(This);\
113 SoNode* altRep = node->alternateRep.getValue();\
114 if((altRep!=NULL) && altRep->isOfType(SoGroup::getClassTypeId()))\
115 altRep->doAction(This);\
117 node->clearAlternateRep();\
122void SoAlternateRepAction::nodeAction(
140 else if(aNode->isOfType(SoGroup::getClassTypeId())) {
141 aNode->doAction(aThis);
143 else if(aNode->isOfType(SoCoordinate3::getClassTypeId())) {
144 aNode->doAction(aThis);
147 else if(aNode->getField(
"alternateRep")!=NULL) {
148 aNode->doAction(aThis);
static void initClass(void)
virtual ~SoAlternateRepAction()
SbBool getGenerate() const