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) by Kongsberg Oil & Gas Technologies.
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 Kongsberg Oil & Gas Technologies
18  * about acquiring a Coin Professional Edition License.
19  *
20  * See http://www.coin3d.org/ for more information.
21  *
22  * Kongsberg Oil & Gas Technologies, Bygdoy Alle 5, 0257 Oslo, NORWAY.
23  * http://www.sim.no/ sales@sim.no coin-support@coin3d.org
24  *
25 \**************************************************************************/
26 
27 #include <Inventor/SbVec2s.h>
28 
29 class SbViewportRegion;
30 class SoEvent;
31 class SoGLRenderAction;
34 class SoNode;
35 class SoCamera;
36 class SoNodeSensor;
37 class SoOneShotSensor;
38 class SoSensor;
39 class Superimposition;
40 class SbColor;
41 
42 typedef void SoSceneManagerRenderCB(void * userdata, class SoSceneManager * mgr);
43 
44 class COIN_DLL_API SoSceneManager {
45 public:
46  SoSceneManager(void);
47  virtual ~SoSceneManager();
48 
49  virtual void render(const SbBool clearwindow = TRUE,
50  const SbBool clearzbuffer = TRUE);
51  virtual void render(SoGLRenderAction * action,
52  const SbBool initmatrices = TRUE,
53  const SbBool clearwindow = TRUE,
54  const SbBool clearzbuffer = TRUE);
55 
56  void setCamera(SoCamera * camera);
57  SoCamera * getCamera(void) const;
58  virtual SbBool processEvent(const SoEvent * const event);
59  void reinitialize(void);
60  void scheduleRedraw(void);
61  virtual void setSceneGraph(SoNode * const sceneroot);
62  virtual SoNode * getSceneGraph(void) const;
63  void setWindowSize(const SbVec2s & newsize);
64  const SbVec2s & getWindowSize(void) const;
65  void setSize(const SbVec2s & newsize);
66  const SbVec2s & getSize(void) const;
67  void setOrigin(const SbVec2s & newOrigin);
68  const SbVec2s & getOrigin(void) const;
69  void setViewportRegion(const SbViewportRegion & newRegion);
70  const SbViewportRegion & getViewportRegion(void) const;
71  void setBackgroundColor(const SbColor & color);
72  const SbColor & getBackgroundColor(void) const;
73  void setBackgroundIndex(const int index);
74  int getBackgroundIndex(void) const;
75  void setRGBMode(const SbBool onOrOff);
76  SbBool isRGBMode(void) const;
77  virtual void activate(void);
78  virtual void deactivate(void);
79  void setRenderCallback(SoSceneManagerRenderCB * f,
80  void * const userData = NULL);
81  SbBool isAutoRedraw(void) const;
82  void setRedrawPriority(const uint32_t priority);
83  uint32_t getRedrawPriority(void) const;
84  void setAntialiasing(const SbBool smoothing, const int numPasses);
85  void getAntialiasing(SbBool & smoothing, int & numPasses) const;
86  void setGLRenderAction(SoGLRenderAction * const action);
87  SoGLRenderAction * getGLRenderAction(void) const;
88  void setAudioRenderAction(SoAudioRenderAction * const action);
89  SoAudioRenderAction * getAudioRenderAction(void) const;
90  void setHandleEventAction(SoHandleEventAction * hea);
91  SoHandleEventAction * getHandleEventAction(void) const;
92 
93  static uint32_t getDefaultRedrawPriority(void);
94  static void enableRealTimeUpdate(const SbBool flag);
95  static SbBool isRealTimeUpdateEnabled(void);
96 
97 protected:
98  int isActive(void) const;
99  void redraw(void);
100 
101 private:
102  friend class SoSceneManagerP;
103  class SoSceneManagerP * pimpl;
104 
105 }; // SoSceneManager
106 
107 #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 SoCamera class is the abstract base class for camera definition nodes.To be able to view a scene...
Definition: SoCamera.h:54
The SoNode class is the base class for nodes used in scene graphs.Coin is a retained mode 3D visualiz...
Definition: SoNode.h:47
The SoNodeSensor class detects changes to nodes.Attach a node to a sensor of this type to put it unde...
Definition: SoNodeSensor.h:29
The SoSensor class is the abstract base class for all sensors.Sensors is a mechanism in Coin for sche...
Definition: SoSensor.h:34
The SoAudioRenderAction class renders the aural parts of the scene graph.Applying this method at a ro...
Definition: SoAudioRenderAction.h:33
The SoOneShotSensor class is a sensor which will trigger once.Since SoOneShotSensor is a subclass of ...
Definition: SoOneShotSensor.h:29
The SoHandleEventAction class distributes user events to the scene.This is the action used by the GUI...
Definition: SoHandleEventAction.h:37
The SoEvent class is the base class for all Coin events.Coin contains its own set of event classes...
Definition: SoEvent.h:34
The SoSceneManager class provides the main interface between the scene graph and the GUI toolkit...
Definition: SoSceneManager.h:44
The SbViewportRegion class is a viewport within a full window.The SbViewportRegion class contains inf...
Definition: SbViewportRegion.h:31
The SbVec2s class is a 2 dimensional vector with short integer coordinates.This vector class is used ...
Definition: SbVec2s.h:41
The SoGLRenderAction class renders the scene graph with OpenGL calls.Applying this method at a root n...
Definition: SoGLRenderAction.h:41

Copyright © 1998-2010 by Kongsberg Oil & Gas Technologies. All rights reserved.

Generated on Wed Feb 7 2018 for Coin by Doxygen 1.8.14.