36#include <Inventor/SbBasic.h>
37#include <Inventor/SoType.h>
38#include <Inventor/misc/SoTempPath.h>
39#include <Inventor/tools/SbPimplPtr.h>
44#include <Inventor/lists/SoActionMethodList.h>
45#include <Inventor/lists/SoEnabledElementsList.h>
48#ifdef COIN_UNDEF_IN_PATH_HACK
49#include <sys/unistd.h>
62#define SO_ENABLE(action, element) \
64 assert(!element::getClassTypeId().isBad()); \
65 action::enableElement(element::getClassTypeId(), \
66 element::getClassStackIndex()); \
79 static void initClass(
void);
80 static void initClasses(
void);
83 enum PathCode { NO_PATH = 0, IN_PATH = 1, BELOW_PATH = 2, OFF_PATH = 3 };
87 static SoType getClassTypeId(
void);
89 virtual SbBool isOfType(
SoType type)
const;
91 virtual void apply(
SoNode * root);
92 virtual void apply(
SoPath * path);
93 virtual void apply(
const SoPathList & pathlist, SbBool obeysrules = FALSE);
95 virtual void invalidateState(
void);
100 SoNode * getNodeAppliedTo(
void)
const;
101 SoPath * getPathAppliedTo(
void)
const;
102 const SoPathList * getPathListAppliedTo(
void)
const;
103 const SoPathList * getOriginalPathListAppliedTo(
void)
const;
105 SbBool isLastPathListAppliedTo(
void)
const;
107 PathCode getPathCode(
int & numindices,
const int * & indices);
109 void traverse(
SoNode *
const node);
110 SbBool hasTerminated(
void)
const;
112 const SoPath * getCurPath(
void);
113 SoState * getState(
void)
const;
115 PathCode getCurPathCode(
void)
const;
116 virtual SoNode * getCurPathTail(
void);
117 void usePathCode(
int & numindices,
const int * & indices);
119 void pushCurPath(
const int childindex,
SoNode * node = NULL);
120 void popCurPath(
const PathCode prevpathcode);
121 void pushCurPath(
void);
123 void popPushCurPath(
const int childindex,
SoNode * node = NULL);
124 void popCurPath(
void);
127 void switchToPathTraversal(
SoPath * path);
128 void switchToNodeTraversal(
SoNode * node);
133 virtual void beginTraversal(
SoNode * node);
134 virtual void endTraversal(
SoNode * node);
135 void setTerminated(
const SbBool flag);
138 virtual SbBool shouldCompactPathList(
void)
const;
150 static SoType classTypeId;
155 static void atexit_cleanup(
void);
174 return this->currentpathcode;
Definition SbPimplPtr.h:55
The SoActionMethodList class contains function pointers for action methods.
Definition SoActionMethodList.h:44
The SoAction class is the base class for all traversal actions.
Definition SoAction.h:77
SoActionMethodList * traversalMethods
Definition SoAction.h:141
PathCode
Definition SoAction.h:83
AppliedCode
Definition SoAction.h:82
virtual SoType getTypeId(void) const =0
SoState * state
Definition SoAction.h:140
PathCode getCurPathCode(void) const
Definition SoAction.h:172
The SoEnabledElementsList class is a container for type info for element types that are enabled in ac...
Definition SoEnabledElementsList.h:38
The SoNode class is the base class for nodes used in scene graphs.
Definition SoNode.h:56
The SoPathList class is a container for pointers to SoPath objects.
Definition SoPathList.h:40
The SoPath class is a container class for traversal path descriptions.
Definition SoPath.h:52
The SoState class manages the Coin scene graph traversal state data.
Definition SoState.h:44
The SoTempPath class is used to store temporary paths.
Definition SoTempPath.h:38
The SoType class is the basis for the runtime type system in Coin.
Definition SoType.h:59