31#include <Inventor/nodes/SoNode.h>
32#include <Inventor/elements/SoSwitchElement.h>
33#include <Inventor/elements/SoCoordinateElement.h>
43 static bool first =
true;
51 SO_ACTION_ADD_METHOD(SoNode,nodeAction);
77 fGenerate = aGenerate;
89#include <Inventor/nodes/SoNode.h>
90#include <Inventor/nodes/SoGroup.h>
91#include <Inventor/nodes/SoCoordinate3.h>
97#define IF_CLASS(aClass) \
98 if(aNode->isOfType(aClass::getClassTypeId())) {\
100 aClass* node = (aClass*)aNode;\
101 if(This->fGenerate==TRUE) {\
102 if(node->alternateRep.getValue()==NULL) {\
103 node->generateAlternateRep();\
105 SoNode* altRep = node->alternateRep.getValue();\
106 if((altRep!=NULL) && altRep->isOfType(SoGroup::getClassTypeId()))\
107 altRep->doAction(This);\
111 SoNode* altRep = node->alternateRep.getValue();\
112 if((altRep!=NULL) && altRep->isOfType(SoGroup::getClassTypeId()))\
113 altRep->doAction(This);\
115 node->clearAlternateRep();\
120void SoAlternateRepAction::nodeAction(
138 else if(aNode->isOfType(SoGroup::getClassTypeId())) {
139 aNode->doAction(aThis);
141 else if(aNode->isOfType(SoCoordinate3::getClassTypeId())) {
142 aNode->doAction(aThis);
145 else if(aNode->getField(
"alternateRep")!=NULL) {
146 aNode->doAction(aThis);
void setGenerate(SbBool)
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//
virtual ~SoAlternateRepAction()
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//
SbBool getGenerate() const
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//