Geant4 11.2.2
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
SoAlternateRepAction.cc File Reference
#include <HEPVis/actions/SoAlternateRepAction.h>
#include <Inventor/nodes/SoNode.h>
#include <Inventor/elements/SoSwitchElement.h>
#include <Inventor/elements/SoCoordinateElement.h>
#include <Inventor/nodes/SoGroup.h>
#include <Inventor/nodes/SoCoordinate3.h>

Go to the source code of this file.

Macros

#define IF_CLASS(aClass)
 

Macro Definition Documentation

◆ IF_CLASS

#define IF_CLASS ( aClass)
Value:
if(aNode->isOfType(aClass::getClassTypeId())) {\
/*printf("debug : SoAlternateRepAction::nodeAction : %s generate %d\n",#aClass,This->fGenerate);*/\
aClass* node = (aClass*)aNode;\
if(This->fGenerate==TRUE) {\
if(node->alternateRep.getValue()==NULL) {\
node->generateAlternateRep();\
/* Then go down if needed : */\
SoNode* altRep = node->alternateRep.getValue();\
if((altRep!=NULL) && altRep->isOfType(SoGroup::getClassTypeId()))\
altRep->doAction(This);\
}\
} else {\
/* First go down if needed : */\
SoNode* altRep = node->alternateRep.getValue();\
if((altRep!=NULL) && altRep->isOfType(SoGroup::getClassTypeId()))\
altRep->doAction(This);\
/* Then clear : */\
node->clearAlternateRep();\
}\
}
#define TRUE
Definition globals.hh:41

Definition at line 97 of file SoAlternateRepAction.cc.

97#define IF_CLASS(aClass) \
98 if(aNode->isOfType(aClass::getClassTypeId())) {\
99 /*printf("debug : SoAlternateRepAction::nodeAction : %s generate %d\n",#aClass,This->fGenerate);*/\
100 aClass* node = (aClass*)aNode;\
101 if(This->fGenerate==TRUE) {\
102 if(node->alternateRep.getValue()==NULL) {\
103 node->generateAlternateRep();\
104 /* Then go down if needed : */\
105 SoNode* altRep = node->alternateRep.getValue();\
106 if((altRep!=NULL) && altRep->isOfType(SoGroup::getClassTypeId()))\
107 altRep->doAction(This);\
108 }\
109 } else {\
110 /* First go down if needed : */\
111 SoNode* altRep = node->alternateRep.getValue();\
112 if((altRep!=NULL) && altRep->isOfType(SoGroup::getClassTypeId()))\
113 altRep->doAction(This);\
114 /* Then clear : */\
115 node->clearAlternateRep();\
116 }\
117 }