Open Inventor Release 2023.2.3
 
Loading...
Searching...
No Matches
SoMultiSwitch.h
Go to the documentation of this file.
1/*=======================================================================
2 *** THE CONTENT OF THIS WORK IS PROPRIETARY TO FEI S.A.S, (FEI S.A.S.), ***
3 *** AND IS DISTRIBUTED UNDER A LICENSE AGREEMENT. ***
4 *** ***
5 *** REPRODUCTION, DISCLOSURE, OR USE, IN WHOLE OR IN PART, OTHER THAN AS ***
6 *** SPECIFIED IN THE LICENSE ARE NOT TO BE UNDERTAKEN EXCEPT WITH PRIOR ***
7 *** WRITTEN AUTHORIZATION OF FEI S.A.S. ***
8 *** ***
9 *** RESTRICTED RIGHTS LEGEND ***
10 *** USE, DUPLICATION, OR DISCLOSURE BY THE GOVERNMENT OF THE CONTENT OF THIS ***
11 *** WORK OR RELATED DOCUMENTATION IS SUBJECT TO RESTRICTIONS AS SET FORTH IN ***
12 *** SUBPARAGRAPH (C)(1) OF THE COMMERCIAL COMPUTER SOFTWARE RESTRICTED RIGHT ***
13 *** CLAUSE AT FAR 52.227-19 OR SUBPARAGRAPH (C)(1)(II) OF THE RIGHTS IN ***
14 *** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 52.227-7013. ***
15 *** ***
16 *** COPYRIGHT (C) 1996-2019 BY FEI S.A.S, ***
17 *** BORDEAUX, FRANCE ***
18 *** ALL RIGHTS RESERVED ***
19**=======================================================================*/
20/*=======================================================================
21** Author(s) : VSG (oct 2011)
22**=======================================================================*/
23
24#ifndef _SO_MULTI_SWITCH_
25#define _SO_MULTI_SWITCH_
26
30
32
33
83class SoMultiSwitch : public SoGroup
84{
85
87 SO_PIMPL_PUBLIC_HEADER(SoMultiSwitch)
88
89 public:
92
95 {
97 NONE = 0,
99 ALL = 1,
101 INCLUDE = 2,
103 EXCLUDE = 3
104 };
105
111
114 {
116 NO = 1 << 0,
118 MODE = 1 << 1,
120 LIST = 1 << 2,
122 ANY = MODE | LIST
123 };
124
130
135
139 SoMultiSwitch(int nChildren);
140
145 virtual SbBool affectsState() const;
146
147 private:
148 // Implement actions
149 virtual void doAction(SoAction *action);
150 virtual void callback(SoCallbackAction *action);
151 virtual void GLRender(SoGLRenderAction *action);
152 virtual void pick(SoPickAction *action);
153 virtual void getBoundingBox(SoGetBoundingBoxAction *action);
154 virtual void handleEvent(SoHandleEventAction *action);
155 virtual void getMatrix(SoGetMatrixAction *action);
156 virtual void search(SoSearchAction *action);
157 virtual void write(SoWriteAction *action);
158 virtual void getPrimitiveCount(SoGetPrimitiveCountAction *action);
159
160 private:
161 static void initClass();
162 static void exitClass();
163
164 virtual void notify(SoNotList *list);
165
171 virtual bool affectsPath() const;
172
173 private:
175 virtual ~SoMultiSwitch();
176
177 // Traverses correct child. If matchIndex >=0, child index must match
178 virtual void doChild(SoAction *action, int matchIndex = -1);
179
180private:
181 void commonConstructor(int nbChildren = -1);
182};
183
184#endif // _SO_MULTI_SWITCH_
185
186
SO_PIMPL_PUBLIC_DECLARATION(SoFileDataAdapter)
#define SO_NODE_HEADER(className)
Definition SoSubNode.h:151
Abstract base class for all actions.
Definition SoAction.h:132
Performs a generic traversal of a scene graph or path.
Renders a scene graph using Open Inventor's Render Engine.
Computes bounding box of a scene.
Computes transformation matrix for a subgraph.
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Counts number of...
Base class for all group nodes.
Definition SoGroup.h:122
Allows nodes in a graph to receive input events.
Multiple-value field containing any number of int32_t integers.
Definition SoMFInt32.h:88
Group node that traverses a set of chosen children.
SoSFEnum traversalMode
Defines the way the children list must be managed.
virtual SbBool affectsState() const
Overrides method in SoNode to return FALSE if there is no selected child or the selected child does n...
SoMFInt32 whichChildren
Indices of the children to traverse.
TraversalMode
Traversal Mode enumerated values.
SoSFEnum inheritMode
Defines the way this node inherit values from the state.
InheritMode
Inheritance Mode enumerated values.
SoMultiSwitch()
Creates a multi-switch node with default settings.
SoMultiSwitch(int nChildren)
Constructor that takes approximate number of children.
Abstract base class for picking objects in a scene.
Field containing an enumerated value.
Definition SoSFEnum.h:89
Searches for nodes in a scene graph.
Writes a scene graph to a file.
int SbBool
Boolean type.
Definition SbBase.h:87
void notify(SoNotList *list)