1 #ifndef COIN_SOACTION_H 2 #define COIN_SOACTION_H 36 #include <Inventor/SbBasic.h> 38 #include <Inventor/misc/SoTempPath.h> 39 #include <Inventor/tools/SbPimplPtr.h> 45 #include <Inventor/lists/SoEnabledElementsList.h> 48 #ifdef COIN_UNDEF_IN_PATH_HACK 49 #include <sys/unistd.h> 55 #endif // COIN_UNDEF_IN_PATH_HACK 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);
88 virtual SoType getTypeId(
void)
const = 0;
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);
162 SbPimplPtr<SoActionP> pimpl;
174 return this->currentpathcode;
177 #endif // !COIN_SOACTION_H
PathCode getCurPathCode(void) const
Definition: SoAction.h:172
The SoPathList class is a container for pointers to SoPath objects.As this class inherits SoBaseList...
Definition: SoPathList.h:40
The SoNode class is the base class for nodes used in scene graphs.Coin is a retained mode 3D visualiz...
Definition: SoNode.h:56
The SoState class manages the Coin scenegraph traversal state data.The SoState class is used by actio...
Definition: SoState.h:44
The SoPath class is a container class for traversal path descriptions.SoPath objects contain a list o...
Definition: SoPath.h:52
AppliedCode
Definition: SoAction.h:82
The SoAction class is the base class for all traversal actions.Applying actions is the basic mechanis...
Definition: SoAction.h:77
The SoTempPath class is used to store temporary paths.The path simply turns off auditing in the const...
Definition: SoTempPath.h:38
SoActionMethodList * traversalMethods
Definition: SoAction.h:141
The SoEnabledElementsList class is a container for type info for element types that are enabled in ac...
Definition: SoEnabledElementsList.h:38
PathCode
Definition: SoAction.h:83
SoState * state
Definition: SoAction.h:140
The SoType class is the basis for the run-time type system in Coin.Many of the classes in the Coin li...
Definition: SoType.h:59
The SoActionMethodList class contains function pointers for action methods.An SoActionMethodList cont...
Definition: SoActionMethodList.h:44