SoSceneManager.h
#ifndef COIN_SOSCENEMANAGER_H
#define COIN_SOSCENEMANAGER_H
/**************************************************************************\
* Copyright (c) Kongsberg Oil & Gas Technologies AS
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* Neither the name of the copyright holder nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
\**************************************************************************/
#include <Inventor/SbVec2s.h>
class SbViewportRegion;
class SoEvent;
class SoGLRenderAction;
class SoAudioRenderAction;
class SoHandleEventAction;
class SoNode;
class SoCamera;
class SoNodeSensor;
class SoOneShotSensor;
class SoSensor;
class Superimposition;
class SbColor;
typedef void SoSceneManagerRenderCB(void * userdata, class SoSceneManager * mgr);
class COIN_DLL_API SoSceneManager {
public:
SoSceneManager(void);
virtual ~SoSceneManager();
virtual void render(const SbBool clearwindow = TRUE,
const SbBool clearzbuffer = TRUE);
virtual void render(SoGLRenderAction * action,
const SbBool initmatrices = TRUE,
const SbBool clearwindow = TRUE,
const SbBool clearzbuffer = TRUE);
void setCamera(SoCamera * camera);
SoCamera * getCamera(void) const;
virtual SbBool processEvent(const SoEvent * const event);
void reinitialize(void);
void scheduleRedraw(void);
virtual void setSceneGraph(SoNode * const sceneroot);
virtual SoNode * getSceneGraph(void) const;
void setWindowSize(const SbVec2s & newsize);
const SbVec2s & getWindowSize(void) const;
void setSize(const SbVec2s & newsize);
const SbVec2s & getSize(void) const;
void setOrigin(const SbVec2s & newOrigin);
const SbVec2s & getOrigin(void) const;
void setViewportRegion(const SbViewportRegion & newRegion);
const SbViewportRegion & getViewportRegion(void) const;
void setBackgroundColor(const SbColor & color);
const SbColor & getBackgroundColor(void) const;
void setBackgroundIndex(const int index);
int getBackgroundIndex(void) const;
void setRGBMode(const SbBool onOrOff);
SbBool isRGBMode(void) const;
virtual void activate(void);
virtual void deactivate(void);
void setRenderCallback(SoSceneManagerRenderCB * f,
void * const userData = NULL);
SbBool isAutoRedraw(void) const;
void setRedrawPriority(const uint32_t priority);
uint32_t getRedrawPriority(void) const;
void setAntialiasing(const SbBool smoothing, const int numPasses);
void getAntialiasing(SbBool & smoothing, int & numPasses) const;
void setGLRenderAction(SoGLRenderAction * const action);
SoGLRenderAction * getGLRenderAction(void) const;
void setAudioRenderAction(SoAudioRenderAction * const action);
SoAudioRenderAction * getAudioRenderAction(void) const;
void setHandleEventAction(SoHandleEventAction * hea);
SoHandleEventAction * getHandleEventAction(void) const;
static uint32_t getDefaultRedrawPriority(void);
static void enableRealTimeUpdate(const SbBool flag);
static SbBool isRealTimeUpdateEnabled(void);
protected:
int isActive(void) const;
void redraw(void);
private:
friend class SoSceneManagerP;
class SoSceneManagerP * pimpl;
}; // SoSceneManager
#endif // !COIN_SOSCENEMANAGER_H
SbColor
The SbColor class contains the red, green and blue components which make up a color value.
Definition SbColor.h:39
SbVec2s
The SbVec2s class is a 2 dimensional vector with short integer coordinates.
Definition SbVec2s.h:51
SbViewportRegion
The SbViewportRegion class is a viewport within a full window.
Definition SbViewportRegion.h:40
SoAudioRenderAction
The SoAudioRenderAction class renders the aural parts of the scene graph.
Definition SoAudioRenderAction.h:42
SoCamera
The SoCamera class is the abstract base class for camera definition nodes.
Definition SoCamera.h:64
SoEvent
The SoEvent class is the base class for all Coin events.
Definition SoEvent.h:45
SoGLRenderAction
The SoGLRenderAction class renders the scene graph with OpenGL calls.
Definition SoGLRenderAction.h:50
SoHandleEventAction
The SoHandleEventAction class distributes user events to the scene.
Definition SoHandleEventAction.h:46
SoNodeSensor
The SoNodeSensor class detects changes to nodes.
Definition SoNodeSensor.h:38
SoNode
The SoNode class is the base class for nodes used in scene graphs.
Definition SoNode.h:56
SoOneShotSensor
The SoOneShotSensor class is a sensor which will trigger once.
Definition SoOneShotSensor.h:38
SoSceneManager
The SoSceneManager class provides the main interface between the scene graph and the GUI toolkit.
Definition SoSceneManager.h:53
SoSceneManager::getSceneGraph
virtual SoNode * getSceneGraph(void) const
Definition SoSceneManager.cpp:283
SoSceneManager::reinitialize
void reinitialize(void)
Definition SoSceneManager.cpp:214
SoSceneManager::render
virtual void render(const SbBool clearwindow=TRUE, const SbBool clearzbuffer=TRUE)
Definition SoSceneManager.cpp:142
SoSceneManager::getWindowSize
const SbVec2s & getWindowSize(void) const
Definition SoSceneManager.cpp:308
SoSceneManager::processEvent
virtual SbBool processEvent(const SoEvent *const event)
Definition SoSceneManager.cpp:180
SoSceneManager::setSceneGraph
virtual void setSceneGraph(SoNode *const sceneroot)
Definition SoSceneManager.cpp:258
SoSceneManager::getAntialiasing
void getAntialiasing(SbBool &smoothing, int &numPasses) const
Definition SoSceneManager.cpp:555
SoSceneManager::setAntialiasing
void setAntialiasing(const SbBool smoothing, const int numPasses)
Definition SoSceneManager.cpp:544
SoSceneManager::enableRealTimeUpdate
static void enableRealTimeUpdate(const SbBool flag)
Definition SoSceneManager.cpp:638
SoSceneManager::isRealTimeUpdateEnabled
static SbBool isRealTimeUpdateEnabled(void)
Definition SoSceneManager.cpp:648
SoSceneManager::setAudioRenderAction
void setAudioRenderAction(SoAudioRenderAction *const action)
Definition SoSceneManager.cpp:584
SoSceneManager::getBackgroundColor
const SbColor & getBackgroundColor(void) const
Definition SoSceneManager.cpp:421
SoSceneManager::isAutoRedraw
SbBool isAutoRedraw(void) const
Definition SoSceneManager.cpp:510
SoSceneManager::setSize
void setSize(const SbVec2s &newsize)
Definition SoSceneManager.cpp:318
SoSceneManager::setRenderCallback
void setRenderCallback(SoSceneManagerRenderCB *f, void *const userData=NULL)
Definition SoSceneManager.cpp:494
SoSceneManager::getGLRenderAction
SoGLRenderAction * getGLRenderAction(void) const
Definition SoSceneManager.cpp:574
SoSceneManager::setOrigin
void setOrigin(const SbVec2s &newOrigin)
Definition SoSceneManager.cpp:345
SoSceneManager::getBackgroundIndex
int getBackgroundIndex(void) const
Definition SoSceneManager.cpp:446
SoSceneManager::setCamera
void setCamera(SoCamera *camera)
Definition SoSceneManager.cpp:189
SoSceneManager::SoSceneManager
SoSceneManager(void)
Definition SoSceneManager.cpp:99
SoSceneManager::setBackgroundColor
void setBackgroundColor(const SbColor &color)
Definition SoSceneManager.cpp:411
SoSceneManager::isActive
int isActive(void) const
Definition SoSceneManager.cpp:235
SoSceneManager::getDefaultRedrawPriority
static uint32_t getDefaultRedrawPriority(void)
Definition SoSceneManager.cpp:624
SoSceneManager::getRedrawPriority
uint32_t getRedrawPriority(void) const
Definition SoSceneManager.cpp:532
SoSceneManager::getViewportRegion
const SbViewportRegion & getViewportRegion(void) const
Definition SoSceneManager.cpp:402
SoSceneManager::deactivate
virtual void deactivate(void)
Definition SoSceneManager.cpp:483
SoSceneManager::setRedrawPriority
void setRedrawPriority(const uint32_t priority)
Definition SoSceneManager.cpp:523
SoSceneManager::getOrigin
const SbVec2s & getOrigin(void) const
Definition SoSceneManager.cpp:362
SoSceneManager::setViewportRegion
void setViewportRegion(const SbViewportRegion &newRegion)
Definition SoSceneManager.cpp:376
SoSceneManager::getHandleEventAction
SoHandleEventAction * getHandleEventAction(void) const
Definition SoSceneManager.cpp:612
SoSceneManager::setHandleEventAction
void setHandleEventAction(SoHandleEventAction *hea)
Definition SoSceneManager.cpp:603
SoSceneManager::setGLRenderAction
void setGLRenderAction(SoGLRenderAction *const action)
Definition SoSceneManager.cpp:565
SoSceneManager::setRGBMode
void setRGBMode(const SbBool onOrOff)
Definition SoSceneManager.cpp:456
SoSceneManager::getCamera
SoCamera * getCamera(void) const
Definition SoSceneManager.cpp:204
SoSceneManager::getAudioRenderAction
SoAudioRenderAction * getAudioRenderAction(void) const
Definition SoSceneManager.cpp:593
SoSceneManager::isRGBMode
SbBool isRGBMode(void) const
Definition SoSceneManager.cpp:465
SoSceneManager::redraw
void redraw(void)
Definition SoSceneManager.cpp:244
SoSceneManager::getSize
const SbVec2s & getSize(void) const
Definition SoSceneManager.cpp:333
SoSceneManager::activate
virtual void activate(void)
Definition SoSceneManager.cpp:474
SoSceneManager::setBackgroundIndex
void setBackgroundIndex(const int index)
Definition SoSceneManager.cpp:435
SoSceneManager::scheduleRedraw
void scheduleRedraw(void)
Definition SoSceneManager.cpp:226
SoSceneManager::setWindowSize
void setWindowSize(const SbVec2s &newsize)
Definition SoSceneManager.cpp:297
SoSensor
The SoSensor class is the abstract base class for all sensors.
Definition SoSensor.h:43