.TH "SoSceneManager" 3 "Thu May 29 2014" "Version 4.0.0a" "Coin" \" -*- nroff -*- .ad l .nh .SH NAME SoSceneManager \- .PP The \fBSoSceneManager\fP class provides the main interface between the scene graph and the GUI toolkit\&. .PP The renderarea 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\&. .SH SYNOPSIS .br .PP .PP \fC#include \fP .SS "Public Member Functions" .in +1c .ti -1c .RI "\fBSoSceneManager\fP (void)" .br .ti -1c .RI "virtual \fB~SoSceneManager\fP ()" .br .ti -1c .RI "virtual void \fBrender\fP (const SbBool clearwindow=TRUE, const SbBool clearzbuffer=TRUE)" .br .ti -1c .RI "virtual void \fBrender\fP (\fBSoGLRenderAction\fP *action, const SbBool initmatrices=TRUE, const SbBool clearwindow=TRUE, const SbBool clearzbuffer=TRUE)" .br .ti -1c .RI "void \fBsetCamera\fP (\fBSoCamera\fP *camera)" .br .ti -1c .RI "\fBSoCamera\fP * \fBgetCamera\fP (void) const " .br .ti -1c .RI "virtual SbBool \fBprocessEvent\fP (const \fBSoEvent\fP *const event)" .br .ti -1c .RI "void \fBreinitialize\fP (void)" .br .ti -1c .RI "void \fBscheduleRedraw\fP (void)" .br .ti -1c .RI "virtual void \fBsetSceneGraph\fP (\fBSoNode\fP *const sceneroot)" .br .ti -1c .RI "virtual \fBSoNode\fP * \fBgetSceneGraph\fP (void) const " .br .ti -1c .RI "void \fBsetWindowSize\fP (const \fBSbVec2s\fP &newsize)" .br .ti -1c .RI "const \fBSbVec2s\fP & \fBgetWindowSize\fP (void) const " .br .ti -1c .RI "void \fBsetSize\fP (const \fBSbVec2s\fP &newsize)" .br .ti -1c .RI "const \fBSbVec2s\fP & \fBgetSize\fP (void) const " .br .ti -1c .RI "void \fBsetOrigin\fP (const \fBSbVec2s\fP &newOrigin)" .br .ti -1c .RI "const \fBSbVec2s\fP & \fBgetOrigin\fP (void) const " .br .ti -1c .RI "void \fBsetViewportRegion\fP (const \fBSbViewportRegion\fP &newRegion)" .br .ti -1c .RI "const \fBSbViewportRegion\fP & \fBgetViewportRegion\fP (void) const " .br .ti -1c .RI "void \fBsetBackgroundColor\fP (const \fBSbColor\fP &color)" .br .ti -1c .RI "const \fBSbColor\fP & \fBgetBackgroundColor\fP (void) const " .br .ti -1c .RI "void \fBsetBackgroundIndex\fP (const int index)" .br .ti -1c .RI "int \fBgetBackgroundIndex\fP (void) const " .br .ti -1c .RI "void \fBsetRGBMode\fP (const SbBool onOrOff)" .br .ti -1c .RI "SbBool \fBisRGBMode\fP (void) const " .br .ti -1c .RI "virtual void \fBactivate\fP (void)" .br .ti -1c .RI "virtual void \fBdeactivate\fP (void)" .br .ti -1c .RI "void \fBsetRenderCallback\fP (\fBSoSceneManagerRenderCB\fP *f, void *const userData=NULL)" .br .ti -1c .RI "SbBool \fBisAutoRedraw\fP (void) const " .br .ti -1c .RI "void \fBsetRedrawPriority\fP (const uint32_t priority)" .br .ti -1c .RI "uint32_t \fBgetRedrawPriority\fP (void) const " .br .ti -1c .RI "void \fBsetAntialiasing\fP (const SbBool smoothing, const int numPasses)" .br .ti -1c .RI "void \fBgetAntialiasing\fP (SbBool &smoothing, int &numPasses) const " .br .ti -1c .RI "void \fBsetGLRenderAction\fP (\fBSoGLRenderAction\fP *const action)" .br .ti -1c .RI "\fBSoGLRenderAction\fP * \fBgetGLRenderAction\fP (void) const " .br .ti -1c .RI "void \fBsetAudioRenderAction\fP (\fBSoAudioRenderAction\fP *const action)" .br .ti -1c .RI "\fBSoAudioRenderAction\fP * \fBgetAudioRenderAction\fP (void) const " .br .ti -1c .RI "void \fBsetHandleEventAction\fP (\fBSoHandleEventAction\fP *hea)" .br .ti -1c .RI "\fBSoHandleEventAction\fP * \fBgetHandleEventAction\fP (void) const " .br .in -1c .SS "Static Public Member Functions" .in +1c .ti -1c .RI "static uint32_t \fBgetDefaultRedrawPriority\fP (void)" .br .ti -1c .RI "static void \fBenableRealTimeUpdate\fP (const SbBool flag)" .br .ti -1c .RI "static SbBool \fBisRealTimeUpdateEnabled\fP (void)" .br .in -1c .SS "Protected Member Functions" .in +1c .ti -1c .RI "int \fBisActive\fP (void) const " .br .ti -1c .RI "void \fBredraw\fP (void)" .br .in -1c .SH "Detailed Description" .PP The \fBSoSceneManager\fP class provides the main interface between the scene graph and the GUI toolkit\&. .PP The renderarea 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 \fBSoSceneManager\fP object\&. The pointer for this object is stored in the GUI renderarea class\&. .SH "Constructor & Destructor Documentation" .PP .SS "SoSceneManager::SoSceneManager (void)" Constructor\&. Sets up default \fBSoGLRenderAction\fP and \fBSoHandleEventAction\fP instances\&. .SS "SoSceneManager::~SoSceneManager ()\fC [virtual]\fP" Destructor\&. .SH "Member Function Documentation" .PP .SS "void SoSceneManager::render (const SbBoolclearwindow = \fCTRUE\fP, const SbBoolclearzbuffer = \fCTRUE\fP)\fC [virtual]\fP" Render the scene graph\&. .PP If \fIclearwindow\fP is \fCTRUE\fP, clear the rendering buffer before drawing\&. If \fIclearzbuffer\fP is \fCTRUE\fP, clear the depth buffer values before rendering\&. Both of these arguments should normally be \fCTRUE\fP, but they can be set to \fCFALSE\fP to optimize for special cases (e\&.g\&. when doing wireframe rendering one doesn't need a depth buffer)\&. .SS "void SoSceneManager::render (\fBSoGLRenderAction\fP *action, const SbBoolinitmatrices = \fCTRUE\fP, const SbBoolclearwindow = \fCTRUE\fP, const SbBoolclearzbuffer = \fCTRUE\fP)\fC [virtual]\fP" Render method used for thread safe rendering\&. .PP Since only one thread can use an \fBSoGLRenderAction\fP, this method enables you to supply your own thread-specific \fBSoGLRenderAction\fP to be used for rendering the scene\&. .PP If \fIinitmatrices\fP is \fCTRUE\fP, the OpenGL model and projection matrices will be initialized to identity matrices before applying the action\&. .PP If \fIclearwindow\fP is \fCTRUE\fP, clear the rendering buffer before drawing\&. If \fIclearzbuffer\fP is \fCTRUE\fP, clear the depth buffer values before rendering\&. .PP This function is an extension for Coin, and it is not available in the original SGI Open Inventor v2\&.1 API\&. .PP \fBSince:\fP .RS 4 Coin 2\&.0 .RE .PP .SS "void SoSceneManager::setCamera (\fBSoCamera\fP *camera)" Sets the camera to be used\&. .SS "\fBSoCamera\fP * SoSceneManager::getCamera (void) const" Returns the current camera\&. .SS "SbBool SoSceneManager::processEvent (const \fBSoEvent\fP *constevent)\fC [virtual]\fP" Process the given event by applying an \fBSoHandleEventAction\fP on the scene graph\&. .SS "void SoSceneManager::reinitialize (void)" Reinitialize after parameters affecting the OpenGL context has changed\&. .SS "void SoSceneManager::scheduleRedraw (void)" Redraw at first opportunity as system becomes idle\&. .PP Multiple calls to this method before an actual redraw has taken place will only result in a single redraw of the scene\&. .SS "void SoSceneManager::setSceneGraph (\fBSoNode\fP *constsceneroot)\fC [virtual]\fP" Set the node which is top of the scene graph we're managing\&. The \fIsceneroot\fP node reference count will be increased by 1, and any previously set scene graph top node will have it's reference count decreased by 1\&. .PP \fBSee also:\fP .RS 4 \fBgetSceneGraph()\fP .RE .PP .SS "\fBSoNode\fP * SoSceneManager::getSceneGraph (void) const\fC [virtual]\fP" Returns pointer to root of scene graph\&. .SS "void SoSceneManager::setWindowSize (const \fBSbVec2s\fP &newsize)" Update window size of our \fBSoGLRenderAction\fP's viewport settings\&. .PP Note that this will \fIonly\fP change the information about window dimensions, the actual viewport size and origin (ie the rectangle which redraws are confined to) will stay the same\&. .PP \fBSee also:\fP .RS 4 \fBsetViewportRegion()\fP .RE .PP .SS "const \fBSbVec2s\fP & SoSceneManager::getWindowSize (void) const" Returns the current render action window size\&. .PP \fBSee also:\fP .RS 4 \fBsetWindowSize()\fP .RE .PP .SS "void SoSceneManager::setSize (const \fBSbVec2s\fP &newsize)" Set size of rendering area for the viewport within the current window\&. .SS "const \fBSbVec2s\fP & SoSceneManager::getSize (void) const" Returns size of render area\&. .SS "void SoSceneManager::setOrigin (const \fBSbVec2s\fP &newOrigin)" Set \fIonly\fP the origin of the viewport region within the rendering window\&. .PP \fBSee also:\fP .RS 4 \fBsetViewportRegion()\fP, \fBsetWindowSize()\fP .RE .PP .SS "const \fBSbVec2s\fP & SoSceneManager::getOrigin (void) const" Returns origin of rendering area viewport\&. .PP \fBSee also:\fP .RS 4 \fBsetOrigin()\fP .RE .PP .SS "void SoSceneManager::setViewportRegion (const \fBSbViewportRegion\fP &newregion)" Update our \fBSoGLRenderAction\fP's viewport settings\&. .PP This will change \fIboth\fP the information about window dimensions and the actual viewport size and origin\&. .PP \fBSee also:\fP .RS 4 \fBsetWindowSize()\fP .RE .PP .SS "const \fBSbViewportRegion\fP & SoSceneManager::getViewportRegion (void) const" Returns current viewport region used by the renderaction and the event handling\&. .PP \fBSee also:\fP .RS 4 \fBsetViewportRegion()\fP .RE .PP .SS "void SoSceneManager::setBackgroundColor (const \fBSbColor\fP &color)" Sets color of rendering canvas\&. .SS "const \fBSbColor\fP & SoSceneManager::getBackgroundColor (void) const" Returns color used for clearing the rendering area before rendering the scene\&. .SS "void SoSceneManager::setBackgroundIndex (const intindex)" Set index of background color in the color lookup table if rendering in colorindex mode\&. .PP Note: colorindex mode is not supported yet in Coin\&. .SS "int SoSceneManager::getBackgroundIndex (void) const" Returns index of colormap for background filling\&. .PP \fBSee also:\fP .RS 4 \fBsetBackgroundIndex()\fP .RE .PP .SS "void SoSceneManager::setRGBMode (const SbBoolyes)" Turn RGB truecolor mode on or off\&. If you turn truecolor mode off, colorindex mode will be used instead\&. .SS "SbBool SoSceneManager::isRGBMode (void) const" Returns the 'truecolor or colorindex' mode flag\&. .SS "void SoSceneManager::activate (void)\fC [virtual]\fP" Activate rendering and event handling\&. Default is \fCoff\fP\&. .SS "void SoSceneManager::deactivate (void)\fC [virtual]\fP" Deactive rendering and event handling\&. .SS "void SoSceneManager::setRenderCallback (\fBSoSceneManagerRenderCB\fP *f, void *constuserdata = \fCNULL\fP)" Set the callback function \fIf\fP to invoke when rendering the scene\&. \fIuserdata\fP will be passed as the first argument of the function\&. .SS "SbBool SoSceneManager::isAutoRedraw (void) const" Returns \fCTRUE\fP if the \fBSoSceneManager\fP automatically redraws the scene upon detecting changes in the scene graph\&. .PP The automatic redraw is turned on and off by setting either a valid callback function with \fBsetRenderCallback()\fP, or by passing \fCNULL\fP\&. .SS "void SoSceneManager::setRedrawPriority (const uint32_tpriority)" Set up the redraw \fIpriority\fP for the \fBSoOneShotSensor\fP 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\&. .PP \fBSee also:\fP .RS 4 \fBSoDelayQueueSensor\fP .RE .PP .SS "uint32_t SoSceneManager::getRedrawPriority (void) const" Returns value of priority on the redraw sensor\&. .SS "void SoSceneManager::setAntialiasing (const SbBoolsmoothing, const intnumpasses)" Turn antialiased rendering on or off\&. .PP See documentation for \fBSoGLRenderAction::setSmoothing()\fP and \fBSoGLRenderAction::setNumPasses()\fP\&. .SS "void SoSceneManager::getAntialiasing (SbBool &smoothing, int &numpasses) const" Returns rendering pass information\&. .PP \fBSee also:\fP .RS 4 \fBsetAntialiasing()\fP .RE .PP .SS "void SoSceneManager::setGLRenderAction (\fBSoGLRenderAction\fP *constaction)" Set the \fIaction\fP to use for rendering\&. Overrides the default action made in the constructor\&. .SS "\fBSoGLRenderAction\fP * SoSceneManager::getGLRenderAction (void) const" Returns pointer to render action\&. .SS "void SoSceneManager::setAudioRenderAction (\fBSoAudioRenderAction\fP *constaction)" Set the \fIaction\fP to use for rendering audio\&. Overrides the default action made in the constructor\&. .SS "\fBSoAudioRenderAction\fP * SoSceneManager::getAudioRenderAction (void) const" Returns pointer to audio render action\&. .SS "void SoSceneManager::setHandleEventAction (\fBSoHandleEventAction\fP *hea)" Set the \fIaction\fP to use for event handling\&. Overrides the default action made in the constructor\&. .SS "\fBSoHandleEventAction\fP * SoSceneManager::getHandleEventAction (void) const" Returns pointer to event handler action\&. .SS "uint32_t SoSceneManager::getDefaultRedrawPriority (void)\fC [static]\fP" Returns the default priority of the redraw sensor\&. .PP \fBSee also:\fP .RS 4 \fBSoDelayQueueSensor\fP, \fBsetRedrawPriority()\fP .RE .PP .SS "void SoSceneManager::enableRealTimeUpdate (const SbBoolflag)\fC [static]\fP" Set whether or not for \fBSoSceneManager\fP instances to 'touch' the global \fCrealTime\fP field after a redraw\&. If this is not done, redrawing when animating the scene will only happen as fast as the \fCrealTime\fP interval goes (which defaults to 12 times a second)\&. .PP \fBSee also:\fP .RS 4 \fBSoDB::setRealTimeInterval()\fP .RE .PP .SS "SbBool SoSceneManager::isRealTimeUpdateEnabled (void)\fC [static]\fP" Returns whether or not we automatically notifies everything connected to the \fCrealTime\fP field after a redraw\&. .SS "int SoSceneManager::isActive (void) const\fC [protected]\fP" Returns the \fIactive\fP flag\&. .SS "void SoSceneManager::redraw (void)\fC [protected]\fP" Do an immediate redraw by calling the redraw callback function\&. .SH "Author" .PP Generated automatically by Doxygen for Coin from the source code\&.