37#include <Inventor/nodes/SoNode.h>
38#include <Inventor/nodes/SoGroup.h>
39#include <Inventor/nodes/SoSwitch.h>
40#include <Inventor/nodekits/SoBaseKit.h>
41#include <Inventor/elements/SoSwitchElement.h>
46 static bool first =
true;
57:fCount(0),fLookFor(NODE),fType(),fCheckDerived(
TRUE) {
63 SoAction::beginTraversal(node);
73 if(aNode->getTypeId().isDerivedFrom(This->
fType)) This->
fCount++;
80 if(aNode->isOfType(SoSwitch::getClassTypeId())) {
81 SoSwitch* sw = (SoSwitch*)aNode;
82 SbBool flag = sw->whichChild.enableNotify(
FALSE);
83 int old = sw->whichChild.getValue();
84 sw->whichChild.setValue(SO_SWITCH_ALL);
85 aNode->doAction(aThis);
86 sw->whichChild.setValue(old);
87 sw->whichChild.enableNotify(flag);
88 }
else if(aNode->isOfType(SoGroup::getClassTypeId())) {
89 aNode->doAction(aThis);
90 }
else if(aNode->isOfType(SoBaseKit::getClassTypeId())) {
91 aNode->doAction(aThis);
virtual void beginTraversal(SoNode *)
virtual ~SoCounterAction()
static void actionMethod(SoAction *, SoNode *)
void setType(const SoType, SbBool=TRUE)