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

SoSceneManager.h
1#ifndef COIN_SOSCENEMANAGER_H
2#define COIN_SOSCENEMANAGER_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/SbColor.h>
28#include <Inventor/SbVec2s.h>
29
31class SoEvent;
35class SoNode;
36class SoNodeSensor;
37class SoOneShotSensor;
38class SoSensor;
39
40class SoSceneManager;
41typedef void SoSceneManagerRenderCB(void * userdata, SoSceneManager * mgr);
42
43
44class COIN_DLL_API SoSceneManager {
45public:
46 SoSceneManager(void);
47 virtual ~SoSceneManager();
48 virtual void render(const SbBool clearwindow = TRUE,
49 const SbBool clearzbuffer = TRUE);
50 virtual void render(SoGLRenderAction * action,
51 const SbBool initmatrices = TRUE,
52 const SbBool clearwindow = TRUE,
53 const SbBool clearzbuffer = TRUE);
54 virtual SbBool processEvent(const SoEvent * const event);
55 void reinitialize(void);
56 void scheduleRedraw(void);
57 virtual void setSceneGraph(SoNode * const sceneroot);
58 virtual SoNode * getSceneGraph(void) const;
59 void setWindowSize(const SbVec2s & newsize);
60 const SbVec2s & getWindowSize(void) const;
61 void setSize(const SbVec2s & newsize);
62 const SbVec2s & getSize(void) const;
63 void setOrigin(const SbVec2s & newOrigin);
64 const SbVec2s & getOrigin(void) const;
65 void setViewportRegion(const SbViewportRegion & newRegion);
66 const SbViewportRegion & getViewportRegion(void) const;
67 void setBackgroundColor(const SbColor & color);
68 const SbColor & getBackgroundColor(void) const;
69 void setBackgroundIndex(const int index);
70 int getBackgroundIndex(void) const;
71 void setRGBMode(const SbBool onOrOff);
72 SbBool isRGBMode(void) const;
73 virtual void activate(void);
74 virtual void deactivate(void);
75 void setRenderCallback(SoSceneManagerRenderCB * f,
76 void * const userData = NULL);
77 SbBool isAutoRedraw(void) const;
78 void setRedrawPriority(const uint32_t priority);
79 uint32_t getRedrawPriority(void) const;
80 void setAntialiasing(const SbBool smoothing, const int numPasses);
81 void getAntialiasing(SbBool & smoothing, int & numPasses) const;
82 void setGLRenderAction(SoGLRenderAction * const action);
83 SoGLRenderAction * getGLRenderAction(void) const;
84 void setAudioRenderAction(SoAudioRenderAction * const action);
85 SoAudioRenderAction * getAudioRenderAction(void) const;
86 void setHandleEventAction(SoHandleEventAction * hea);
87 SoHandleEventAction * getHandleEventAction(void) const;
88
89 static uint32_t getDefaultRedrawPriority(void);
90 static void enableRealTimeUpdate(const SbBool flag);
91 static SbBool isRealTimeUpdateEnabled(void);
92
93protected:
94 int isActive(void) const;
95 void redraw(void);
96
97private:
98 class SoSceneManagerP * pimpl;
99 friend class SoSceneManagerP;
100};
101
102#endif // !COIN_SOSCENEMANAGER_H
The SbColor class contains the red, green and blue components which make up a color value.
Definition: SbColor.h:30
The SbVec2s class is a 2 dimensional vector with short integer coordinates.
Definition: SbVec2s.h:37
The SbViewportRegion class is a viewport within a full window.
Definition: SbViewportRegion.h:31
The SoAudioRenderAction class renders the aural parts of the scene graph.
Definition: SoAudioRenderAction.h:30
The SoEvent class is the base class for all Coin events.
Definition: SoEvent.h:34
The SoGLRenderAction class renders the scene graph with OpenGL calls.
Definition: SoGLRenderAction.h:39
The SoHandleEventAction class distributes user events to the scene.
Definition: SoHandleEventAction.h:36
The SoNodeSensor class detects changes to nodes.
Definition: SoNodeSensor.h:29
The SoNode class is the base class for nodes used in scene graphs.
Definition: SoNode.h:47
The SoOneShotSensor class is a sensor which will trigger once.
Definition: SoOneShotSensor.h:29
The SoSceneManager class provides the main interface between the scene graph and the GUI toolkit.
Definition: SoSceneManager.h:44
The SoSensor class is the abstract base class for all sensors.
Definition: SoSensor.h:34

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

Generated on Wed Jul 20 2022 for Coin by Doxygen. 1.9.4