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

SoSceneManager.h

00001 #ifndef COIN_SOSCENEMANAGER_H
00002 #define COIN_SOSCENEMANAGER_H
00003 
00004 /**************************************************************************\
00005  *
00006  *  This file is part of the Coin 3D visualization library.
00007  *  Copyright (C) by Kongsberg Oil & Gas Technologies.
00008  *
00009  *  This library is free software; you can redistribute it and/or
00010  *  modify it under the terms of the GNU General Public License
00011  *  ("GPL") version 2 as published by the Free Software Foundation.
00012  *  See the file LICENSE.GPL at the root directory of this source
00013  *  distribution for additional information about the GNU GPL.
00014  *
00015  *  For using Coin with software that can not be combined with the GNU
00016  *  GPL, and for taking advantage of the additional benefits of our
00017  *  support services, please contact Kongsberg Oil & Gas Technologies
00018  *  about acquiring a Coin Professional Edition License.
00019  *
00020  *  See http://www.coin3d.org/ for more information.
00021  *
00022  *  Kongsberg Oil & Gas Technologies, Bygdoy Alle 5, 0257 Oslo, NORWAY.
00023  *  http://www.sim.no/  sales@sim.no  coin-support@coin3d.org
00024  *
00025 \**************************************************************************/
00026 
00027 #include <Inventor/SbVec2s.h>
00028 
00029 class SbViewportRegion;
00030 class SoEvent;
00031 class SoGLRenderAction;
00032 class SoAudioRenderAction;
00033 class SoHandleEventAction;
00034 class SoNode;
00035 class SoCamera;
00036 class SoNodeSensor;
00037 class SoOneShotSensor;
00038 class SoSensor;
00039 class Superimposition;
00040 class SbColor;
00041 
00042 typedef void SoSceneManagerRenderCB(void * userdata, class SoSceneManager * mgr);
00043 
00044 class COIN_DLL_API SoSceneManager {
00045 public:
00046   SoSceneManager(void);
00047   virtual ~SoSceneManager();
00048 
00049   virtual void render(const SbBool clearwindow = TRUE,
00050                       const SbBool clearzbuffer = TRUE);
00051   virtual void render(SoGLRenderAction * action,
00052                       const SbBool initmatrices = TRUE,
00053                       const SbBool clearwindow = TRUE,
00054                       const SbBool clearzbuffer = TRUE);
00055 
00056   void setCamera(SoCamera * camera);
00057   SoCamera * getCamera(void) const;
00058   virtual SbBool processEvent(const SoEvent * const event);
00059   void reinitialize(void);
00060   void scheduleRedraw(void);
00061   virtual void setSceneGraph(SoNode * const sceneroot);
00062   virtual SoNode * getSceneGraph(void) const;
00063   void setWindowSize(const SbVec2s & newsize);
00064   const SbVec2s & getWindowSize(void) const;
00065   void setSize(const SbVec2s & newsize);
00066   const SbVec2s & getSize(void) const;
00067   void setOrigin(const SbVec2s & newOrigin);
00068   const SbVec2s & getOrigin(void) const;
00069   void setViewportRegion(const SbViewportRegion & newRegion);
00070   const SbViewportRegion & getViewportRegion(void) const;
00071   void setBackgroundColor(const SbColor & color);
00072   const SbColor & getBackgroundColor(void) const;
00073   void setBackgroundIndex(const int index);
00074   int getBackgroundIndex(void) const;
00075   void setRGBMode(const SbBool onOrOff);
00076   SbBool isRGBMode(void) const;
00077   virtual void activate(void);
00078   virtual void deactivate(void);
00079   void setRenderCallback(SoSceneManagerRenderCB * f,
00080                          void * const userData = NULL);
00081   SbBool isAutoRedraw(void) const;
00082   void setRedrawPriority(const uint32_t priority);
00083   uint32_t getRedrawPriority(void) const;
00084   void setAntialiasing(const SbBool smoothing, const int numPasses);
00085   void getAntialiasing(SbBool & smoothing, int & numPasses) const;
00086   void setGLRenderAction(SoGLRenderAction * const action);
00087   SoGLRenderAction * getGLRenderAction(void) const;
00088   void setAudioRenderAction(SoAudioRenderAction * const action);
00089   SoAudioRenderAction * getAudioRenderAction(void) const;
00090   void setHandleEventAction(SoHandleEventAction * hea);
00091   SoHandleEventAction * getHandleEventAction(void) const;
00092 
00093   static uint32_t getDefaultRedrawPriority(void);
00094   static void enableRealTimeUpdate(const SbBool flag);
00095   static SbBool isRealTimeUpdateEnabled(void);
00096 
00097 protected:
00098   int isActive(void) const;
00099   void redraw(void);
00100 
00101 private:
00102   friend class SoSceneManagerP;
00103   class SoSceneManagerP * pimpl;
00104 
00105 }; // SoSceneManager
00106 
00107 #endif // !COIN_SOSCENEMANAGER_H

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

Generated for Coin by Doxygen 1.7.3.