Main Page Modules Class Hierarchy Alphabetical List Compound List File List Compound Members

# 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) 1998-2003 by Systems in Motion.  All rights reserved.
    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 Systems in Motion about acquiring
    00018  *  a Coin Professional Edition License.
    00019  *
    00020  *  See <URL:http://www.coin3d.org> for  more information.
    00021  *
    00022  *  Systems in Motion, Teknobyen, Abels Gate 5, 7030 Trondheim, NORWAY.
    00023  *  <URL:http://www.sim.no>.
    00024  *
    00025 \**************************************************************************/
    00026
    00027 #include <Inventor/SbColor.h>
    00028 #include <Inventor/SbVec2s.h>
    00029
    00030 class SbViewportRegion;
    00031 class SoEvent;
    00032 class SoGLRenderAction;
    00033 class SoAudioRenderAction;
    00034 class SoHandleEventAction;
    00035 class SoNode;
    00036 class SoNodeSensor;
    00037 class SoOneShotSensor;
    00038 class SoSensor;
    00039
    00040 class SoSceneManager;
    00041 typedef void SoSceneManagerRenderCB(void * userdata, SoSceneManager * mgr);
    00042
    00043
    00044 class COIN_DLL_API SoSceneManager {
    00045 public:
    00046   SoSceneManager(void);
    00047   virtual ~SoSceneManager();
    00048   virtual void render(const SbBool clearwindow = TRUE,
    00049                       const SbBool clearzbuffer = TRUE);
    00050   virtual void render(SoGLRenderAction * action,
    00051                       const SbBool initmatrices = TRUE,
    00052                       const SbBool clearwindow = TRUE,
    00053                       const SbBool clearzbuffer = TRUE);
    00054   virtual SbBool processEvent(const SoEvent * const event);
    00055   void reinitialize(void);
    00056   void scheduleRedraw(void);
    00057   virtual void setSceneGraph(SoNode * const sceneroot);
    00058   virtual SoNode * getSceneGraph(void) const;
    00059   void setWindowSize(const SbVec2s & newsize);
    00060   const SbVec2s & getWindowSize(void) const;
    00061   void setSize(const SbVec2s & newsize);
    00062   const SbVec2s & getSize(void) const;
    00063   void setOrigin(const SbVec2s & newOrigin);
    00064   const SbVec2s & getOrigin(void) const;
    00065   void setViewportRegion(const SbViewportRegion & newRegion);
    00066   const SbViewportRegion & getViewportRegion(void) const;
    00067   void setBackgroundColor(const SbColor & color);
    00068   const SbColor & getBackgroundColor(void) const;
    00069   void setBackgroundIndex(const int index);
    00070   int getBackgroundIndex(void) const;
    00071   void setRGBMode(const SbBool onOrOff);
    00072   SbBool isRGBMode(void) const;
    00073   virtual void activate(void);
    00074   virtual void deactivate(void);
    00075   void setRenderCallback(SoSceneManagerRenderCB * f,
    00076                          void * const userData = NULL);
    00077   SbBool isAutoRedraw(void) const;
    00078   void setRedrawPriority(const uint32_t priority);
    00079   uint32_t getRedrawPriority(void) const;
    00080   void setAntialiasing(const SbBool smoothing, const int numPasses);
    00081   void getAntialiasing(SbBool & smoothing, int & numPasses) const;
    00082   void setGLRenderAction(SoGLRenderAction * const action);
    00083   SoGLRenderAction * getGLRenderAction(void) const;
    00084   void setAudioRenderAction(SoAudioRenderAction * const action);
    00085   SoAudioRenderAction * getAudioRenderAction(void) const;
    00086   void setHandleEventAction(SoHandleEventAction * hea);
    00087   SoHandleEventAction * getHandleEventAction(void) const;
    00088
    00089   static uint32_t getDefaultRedrawPriority(void);
    00090   static void enableRealTimeUpdate(const SbBool flag);
    00091   static SbBool isRealTimeUpdateEnabled(void);
    00092
    00093 protected:
    00094   int isActive(void) const;
    00095   void redraw(void);
    00096
    00097 private:
    00098   class SoSceneManagerP * pimpl;
    00099   friend class SoSceneManagerP;
    00100 };
    00101
    00102 #endif // !COIN_SOSCENEMANAGER_H