Coin Logo http://www.sim.no
http://www.coin3d.org

SoSwitch.h
1 #ifndef COIN_SOSWITCH_H
2 #define COIN_SOSWITCH_H
3 
4 /**************************************************************************\
5  *
6  * This file is part of the Coin 3D visualization library.
7  * Copyright (C) 1998-2007 by Systems in Motion. All rights reserved.
8  *
9  * This library is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU General Public License
11  * ("GPL") version 2 as published by the Free Software Foundation.
12  * See the file LICENSE.GPL at the root directory of this source
13  * distribution for additional information about the GNU GPL.
14  *
15  * For using Coin with software that can not be combined with the GNU
16  * GPL, and for taking advantage of the additional benefits of our
17  * support services, please contact Systems in Motion about acquiring
18  * a Coin Professional Edition License.
19  *
20  * See http://www.coin3d.org/ for more information.
21  *
22  * Systems in Motion, Postboks 1283, Pirsenteret, 7462 Trondheim, NORWAY.
23  * http://www.sim.no/ sales@sim.no coin-support@coin3d.org
24  *
25 \**************************************************************************/
26 
27 #include <Inventor/nodes/SoSubNode.h>
28 #include <Inventor/fields/SoSFInt32.h>
29 #include <Inventor/nodes/SoGroup.h>
30 
31 #define SO_SWITCH_NONE (-1)
32 #define SO_SWITCH_INHERIT (-2)
33 #define SO_SWITCH_ALL (-3)
34 
35 class SoSwitchP;
36 
37 class COIN_DLL_API SoSwitch : public SoGroup {
38  typedef SoGroup inherited;
39 
40  SO_NODE_HEADER(SoSwitch);
41 
42 public:
43  static void initClass(void);
44  SoSwitch(void);
45  SoSwitch(int numchildren);
46 
48 
49  virtual SbBool affectsState(void) const;
50 
51  virtual void doAction(SoAction * action);
52  virtual void callback(SoCallbackAction * action);
53  virtual void GLRender(SoGLRenderAction * action);
54  virtual void pick(SoPickAction * action);
55  virtual void getBoundingBox(SoGetBoundingBoxAction * action);
56  virtual void handleEvent(SoHandleEventAction * action);
57  virtual void getMatrix(SoGetMatrixAction * action);
58  virtual void search(SoSearchAction * action);
59  virtual void write(SoWriteAction * action);
60  virtual void getPrimitiveCount(SoGetPrimitiveCountAction * action);
61  virtual void audioRender(SoAudioRenderAction * action);
62  virtual void notify(SoNotList *nl);
63 
64 protected:
65  virtual ~SoSwitch();
66 
67  void traverseChildren(SoAction * action);
68 
69 private:
70  SoSwitchP *pimpl;
71  friend class SoSwitchP;
72 
73  void commonConstructor(void);
74 };
75 
76 #endif // !COIN_SOSWITCH_H
SoState
The SoState class manages the Coin scenegraph traversal state data.
Definition: SoState.h:35
SoNode::search
virtual void search(SoSearchAction *action)
Definition: SoNode.cpp:1120
SoSwitch::GLRender
virtual void GLRender(SoGLRenderAction *action)
Definition: SoSwitch.cpp:204
SoAudioRenderAction
The SoAudioRenderAction class renders the aural parts of the scene graph.
Definition: SoAudioRenderAction.h:30
SoGroup::callback
virtual void callback(SoCallbackAction *action)
Definition: SoGroup.cpp:584
SoSwitch::write
virtual void write(SoWriteAction *action)
Definition: SoSwitch.cpp:389
SoDebugError::post
static void post(const char *const source, const char *const format,...)
Definition: SoDebugError.cpp:314
SoWriteAction
The SoWriteAction class writes a scene graph to file.
Definition: SoWriteAction.h:31
SoNotList::getLastRec
SoNotRec * getLastRec(void) const
Definition: SoNotification.cpp:149
SoGroup::GLRender
virtual void GLRender(SoGLRenderAction *action)
Definition: SoGroup.cpp:513
SoNode::notify
virtual void notify(SoNotList *l)
Definition: SoNode.cpp:423
SoOutput::write
virtual void write(const char c)
Definition: SoOutput.cpp:757
SoOutput
The SoOutput class is an abstraction of an output stream.
Definition: SoOutput.h:42
SoSwitch::callback
virtual void callback(SoCallbackAction *action)
Definition: SoSwitch.cpp:343
SoSwitch::getPrimitiveCount
virtual void getPrimitiveCount(SoGetPrimitiveCountAction *action)
Definition: SoSwitch.cpp:413
SoNode::VRML1
@ VRML1
Definition: SoNode.h:61
SoField::isIgnored
SbBool isIgnored(void) const
Definition: SoField.cpp:638
SoSwitch::getBoundingBox
virtual void getBoundingBox(SoGetBoundingBoxAction *action)
Definition: SoSwitch.cpp:211
SoNotRec::getBase
SoBase * getBase(void) const
Definition: SoNotRec.cpp:71
SoSwitch::audioRender
virtual void audioRender(SoAudioRenderAction *action)
Definition: SoSwitch.cpp:350
SoGroup::children
SoChildList * children
Definition: SoGroup.h:75
SoGroup::getBoundingBox
virtual void getBoundingBox(SoGetBoundingBoxAction *action)
Definition: SoGroup.cpp:476
SoGroup::getPrimitiveCount
virtual void getPrimitiveCount(SoGetPrimitiveCountAction *action)
Definition: SoGroup.cpp:771
SoSearchAction
The SoSearchAction class provides methods for searching through scene graphs.
Definition: SoSearchAction.h:32
SoAction
The SoAction class is the base class for all traversal actions.
Definition: SoAction.h:67
SoSwitch
The SoSwitch class is a group node which selects one child subgraph for traversal.
Definition: SoSwitch.h:37
SoSwitch::whichChild
SoSFInt32 whichChild
Definition: SoSwitch.h:47
SoNotRec
The SoNotRec class specifies records for notification lists.
Definition: SoNotRec.h:33
SbString
The SbString class is a string class with convenience functions for string operations.
Definition: SbString.h:42
SoSFInt32
The SoSFInt32 class is a container for a 32-bit integer value.
Definition: SoSFInt32.h:30
SoSwitch::doAction
virtual void doAction(SoAction *action)
Definition: SoSwitch.cpp:238
SoSwitch::~SoSwitch
virtual ~SoSwitch()
Definition: SoSwitch.cpp:180
SoGroup::handleEvent
virtual void handleEvent(SoHandleEventAction *action)
Definition: SoGroup.cpp:613
SoBase::writeHeader
SbBool writeHeader(SoOutput *out, SbBool isgroup, SbBool isengine) const
Definition: SoBase.cpp:1315
SoGetMatrixAction
The SoGetMatrixAction class is an action for accumulating the transformation matrix of a subgraph.
Definition: SoGetMatrixAction.h:35
SoOutput::isBinary
virtual SbBool isBinary(void) const
Definition: SoOutput.cpp:650
SoSwitch::pick
virtual void pick(SoPickAction *action)
Definition: SoSwitch.cpp:361
SoGroup::findChild
virtual int findChild(const SoNode *node) const
Definition: SoGroup.cpp:447
SoSwitch::traverseChildren
void traverseChildren(SoAction *action)
Definition: SoSwitch.cpp:424
SoSwitch::search
virtual void search(SoSearchAction *action)
Definition: SoSwitch.cpp:218
SoAction::getPathCode
PathCode getPathCode(int &numindices, const int *&indices)
Definition: SoAction.cpp:890
SoWriteAction::getOutput
SoOutput * getOutput(void) const
Definition: SoWriteAction.cpp:160
SoBase
The SoBase class is the top-level superclass for a number of class-hierarchies.
Definition: SoBase.h:41
SoAction::getState
SoState * getState(void) const
Definition: SoAction.cpp:1028
SoSwitch::notify
virtual void notify(SoNotList *nl)
Definition: SoSwitch.cpp:431
SoSwitch::SoSwitch
SoSwitch(void)
Definition: SoSwitch.cpp:149
SoSwitch::handleEvent
virtual void handleEvent(SoHandleEventAction *action)
Definition: SoSwitch.cpp:368
SoGetBoundingBoxAction
The SoGetBoundingBoxAction class calculates bounding boxes for nodes and subgraphs.
Definition: SoGetBoundingBoxAction.h:34
SoSearchAction::isSearchingAll
SbBool isSearchingAll(void) const
Definition: SoSearchAction.cpp:287
SoSwitch::affectsState
virtual SbBool affectsState(void) const
Definition: SoSwitch.cpp:316
SoGroup::write
virtual void write(SoWriteAction *action)
Definition: SoGroup.cpp:627
SoCallbackAction
The SoCallbackAction class invokes callbacks at specific nodes.
Definition: SoCallbackAction.h:70
SoAction::getCurPathCode
PathCode getCurPathCode(void) const
Definition: SoAction.h:159
SoGroup::getChildren
virtual SoChildList * getChildren(void) const
Definition: SoGroup.cpp:662
SoOutput::getStage
Stage getStage(void) const
Definition: SoOutput.cpp:744
SoSwitch::getMatrix
virtual void getMatrix(SoGetMatrixAction *action)
Definition: SoSwitch.cpp:375
SoNode::affectsState
virtual SbBool affectsState(void) const
Definition: SoNode.cpp:783
SoBase::writeFooter
void writeFooter(SoOutput *out) const
Definition: SoBase.cpp:1428
SoGroup::audioRender
virtual void audioRender(SoAudioRenderAction *action)
Definition: SoGroup.cpp:620
SoGroup::getChild
virtual SoNode * getChild(int index) const
Definition: SoGroup.cpp:257
SoSwitch::getFieldData
virtual const SoFieldData * getFieldData(void) const
Definition: SoSwitch.cpp:144
SoNode
The SoNode class is the base class for nodes used in scene graphs.
Definition: SoNode.h:47
SoAction::PathCode
PathCode
Definition: SoAction.h:70
SoGroup::getNumChildren
virtual int getNumChildren(void) const
Definition: SoGroup.cpp:271
SoHandleEventAction
The SoHandleEventAction class distributes user events to the scene.
Definition: SoHandleEventAction.h:36
SoGroup
The SoGroup class is a node which managed other node instances.
Definition: SoGroup.h:31
SoChildList::traverse
void traverse(SoAction *const action)
Definition: SoChildList.cpp:404
SoFieldContainer::addWriteReference
virtual void addWriteReference(SoOutput *out, SbBool isfromfield=0)
Definition: SoFieldContainer.cpp:605
SbString::getString
const char * getString(void) const
Definition: SbString.h:71
SoGroup::doAction
virtual void doAction(SoAction *action)
Definition: SoGroup.cpp:462
SoNotList
The SoNotList class is a list of SoNotRec notification records.
Definition: SoNotification.h:34
SoBase::hasMultipleWriteRefs
SbBool hasMultipleWriteRefs(void) const
Definition: SoBase.cpp:1286
SoGLRenderAction
The SoGLRenderAction class renders the scene graph with OpenGL calls.
Definition: SoGLRenderAction.h:39
SoGroup::search
virtual void search(SoSearchAction *action)
Definition: SoGroup.cpp:648
SoGetPrimitiveCountAction
The SoGetPrimitiveCountAction class counts the primitives in a scene.
Definition: SoGetPrimitiveCountAction.h:32
SoChildList::traverseInPath
void traverseInPath(SoAction *const action, const int numindices, const int *indices)
Definition: SoChildList.cpp:253
SoGroup::pick
virtual void pick(SoPickAction *action)
Definition: SoGroup.cpp:606
SoPickAction
The SoPickAction class is the base class for picking actions.
Definition: SoPickAction.h:32
SoGroup::getMatrix
virtual void getMatrix(SoGetMatrixAction *action)
Definition: SoGroup.cpp:591
SoFieldData::write
void write(SoOutput *out, const SoFieldContainer *object) const
Definition: SoFieldData.cpp:634
SoAction::isOfType
virtual SbBool isOfType(SoType type) const
Definition: SoAction.cpp:462
SoSearchAction::isFound
SbBool isFound(void) const
Definition: SoSearchAction.cpp:376

Copyright © 1998-2007 by Systems in Motion AS. All rights reserved.

Generated on Wed Jul 24 2019 for Coin by Doxygen. 1.8.17