Coin
4.0.3
Coin3D core library
|
The SoSceneManager class provides the main interface between the scene graph and the GUI toolkit. More...
#include <Inventor/SoSceneManager.h>
Static Public Member Functions | |
static void | enableRealTimeUpdate (const SbBool flag) |
static uint32_t | getDefaultRedrawPriority (void) |
static SbBool | isRealTimeUpdateEnabled (void) |
Protected Member Functions | |
int | isActive (void) const |
void | redraw (void) |
The SoSceneManager class provides the main interface between the scene graph and the GUI toolkit.
The render area class from the GUI toolkit you are using uses this class as the interface against the scene graph. Event handling and providing "hooks" to do rendering are the main functions of the class.
A Coin library instance within an application will typically contain a single SoSceneManager object. The pointer for this object is stored in the GUI render area class.
SoSceneManager::SoSceneManager | ( | void | ) |
Constructor. Sets up default SoGLRenderAction and SoHandleEventAction instances.
|
virtual |
Destructor.
Activate rendering and event handling. Default is off
.
Set whether or not for SoSceneManager instances to "touch" the global realTime
field after a redraw. If this is not done, redrawing when animating the scene will only happen as fast as the realTime
interval goes (which defaults to 12 times a second).
void SoSceneManager::getAntialiasing | ( | SbBool & | smoothing, |
int & | numpasses ) const |
Returns rendering pass information.
SoAudioRenderAction * SoSceneManager::getAudioRenderAction | ( | void | ) | const |
Returns pointer to audio render action.
Returns color used for clearing the rendering area before rendering the scene.
int SoSceneManager::getBackgroundIndex | ( | void | ) | const |
Returns index of colormap for background filling.
|
static |
Returns the default priority of the redraw sensor.
SoGLRenderAction * SoSceneManager::getGLRenderAction | ( | void | ) | const |
Returns pointer to render action.
SoHandleEventAction * SoSceneManager::getHandleEventAction | ( | void | ) | const |
Returns pointer to event handler action.
Returns origin of rendering area viewport.
uint32_t SoSceneManager::getRedrawPriority | ( | void | ) | const |
Returns value of priority on the redraw sensor.
Returns pointer to root of scene graph.
const SbViewportRegion & SoSceneManager::getViewportRegion | ( | void | ) | const |
Returns current viewport region used by the render action and the event handling.
Returns the current render action window size.
|
protected |
Returns the active flag.
SbBool SoSceneManager::isAutoRedraw | ( | void | ) | const |
Returns TRUE
if the SoSceneManager automatically redraws the scene upon detecting changes in the scene graph.
The automatic redraw is turned on and off by setting either a valid callback function with setRenderCallback(), or by passing NULL
.
|
static |
Returns whether or not we automatically notifies everything connected to the realTime
field after a redraw.
SbBool SoSceneManager::isRGBMode | ( | void | ) | const |
Returns the "truecolor or colorindex" mode flag.
Process the given event by applying an SoHandleEventAction on the scene graph.
Do an immediate redraw by calling the redraw callback function.
Reinitialize after parameters affecting the OpenGL context have changed.
|
virtual |
Render the scene graph.
If clearwindow is TRUE
, clear the rendering buffer before drawing. If clearzbuffer is TRUE
, clear the depth buffer values before rendering. Both of these arguments should normally be TRUE
, but they can be set to FALSE
to optimize for special cases (e.g. when doing wireframe rendering one doesn't need a depth buffer).
|
virtual |
Render method used for thread safe rendering.
Since only one thread can use an SoGLRenderAction, this method enables you to supply your own thread-specific SoGLRenderAction to be used for rendering the scene.
If initmatrices is TRUE
, the OpenGL model and projection matrices will be initialized to identity matrices before applying the action.
If clearwindow is TRUE
, clear the rendering buffer before drawing. If clearzbuffer is TRUE
, clear the depth buffer values before rendering.
This function is an extension for Coin, and it is not available in the original SGI Open Inventor v2.1 API.
Redraw at first opportunity as system becomes idle.
Multiple calls to this method before an actual redraw has taken place will only result in a single redraw of the scene.
Turn antialiased rendering on or off.
See documentation for SoGLRenderAction::setSmoothing() and SoGLRenderAction::setNumPasses().
void SoSceneManager::setAudioRenderAction | ( | SoAudioRenderAction *const | action | ) |
Set the action to use for rendering audio. Overrides the default action made in the constructor.
Set index of background color in the color lookup table if rendering in color index mode.
Note: color index mode is not supported yet in Coin.
void SoSceneManager::setGLRenderAction | ( | SoGLRenderAction *const | action | ) |
Set the action to use for rendering. Overrides the default action made in the constructor.
void SoSceneManager::setHandleEventAction | ( | SoHandleEventAction * | hea | ) |
Set the action to use for event handling. Overrides the default action made in the constructor.
Set only the origin of the viewport region within the rendering window.
Set up the redraw priority for the SoOneShotSensor used to trigger redraws. By setting this lower than for your own sensors, you can make sure some code is always run before redraw happens.
Set the callback function f to invoke when rendering the scene. userdata will be passed as the first argument of the function.
Turn RGB truecolor mode on or off. If you turn truecolor mode off, colorindex mode will be used instead.
Set the node which is top of the scene graph we're managing. The sceneroot node reference count will be increased by 1, and any previously set scene graph top node will have its reference count decreased by 1.
Set size of rendering area for the viewport within the current window.
void SoSceneManager::setViewportRegion | ( | const SbViewportRegion & | newregion | ) |
Update our SoGLRenderAction's viewport settings.
This will change both the information about window dimensions and the actual viewport size and origin.
Update window size of our SoGLRenderAction's viewport settings.
Note that this will only change the information about window dimensions, the actual viewport size and origin (i.e. the rectangle which redraws are confined to) will stay the same.