.TH "SoSceneManager" 3 "Tue Dec 26 2023 17:59:22" "Version 4.0.2" "Coin" \" -*- nroff -*- .ad l .nh .SH NAME SoSceneManager \- The \fBSoSceneManager\fP class provides the main interface between the scene graph and the GUI toolkit\&. .SH SYNOPSIS .br .PP .PP \fC#include \fP .SS "Public Member Functions" .in +1c .ti -1c .RI "\fBSoSceneManager\fP (\fBvoid\fP)" .br .ti -1c .RI "\fBvirtual\fP \fB~SoSceneManager\fP ()" .br .ti -1c .RI "\fBvirtual\fP \fBvoid\fP \fBrender\fP (\fBconst\fP SbBool \fBclearwindow\fP=TRUE, \fBconst\fP SbBool \fBclearzbuffer\fP=TRUE)" .br .ti -1c .RI "\fBvirtual\fP \fBvoid\fP \fBrender\fP (\fBSoGLRenderAction\fP *action, \fBconst\fP SbBool \fBinitmatrices\fP=TRUE, \fBconst\fP SbBool \fBclearwindow\fP=TRUE, \fBconst\fP SbBool \fBclearzbuffer\fP=TRUE)" .br .ti -1c .RI "\fBvoid\fP \fBsetCamera\fP (\fBSoCamera\fP *camera)" .br .ti -1c .RI "\fBSoCamera\fP * \fBgetCamera\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "\fBvirtual\fP SbBool \fBprocessEvent\fP (\fBconst\fP \fBSoEvent\fP *\fBconst\fP event)" .br .ti -1c .RI "\fBvoid\fP \fBreinitialize\fP (\fBvoid\fP)" .br .ti -1c .RI "\fBvoid\fP \fBscheduleRedraw\fP (\fBvoid\fP)" .br .ti -1c .RI "\fBvirtual\fP \fBvoid\fP \fBsetSceneGraph\fP (\fBSoNode\fP *\fBconst\fP \fBsceneroot\fP)" .br .ti -1c .RI "\fBvirtual\fP \fBSoNode\fP * \fBgetSceneGraph\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "\fBvoid\fP \fBsetWindowSize\fP (\fBconst\fP \fBSbVec2s\fP &\fBnewsize\fP)" .br .ti -1c .RI "\fBconst\fP \fBSbVec2s\fP & \fBgetWindowSize\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "\fBvoid\fP \fBsetSize\fP (\fBconst\fP \fBSbVec2s\fP &\fBnewsize\fP)" .br .ti -1c .RI "\fBconst\fP \fBSbVec2s\fP & \fBgetSize\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "\fBvoid\fP \fBsetOrigin\fP (\fBconst\fP \fBSbVec2s\fP &\fBnewOrigin\fP)" .br .ti -1c .RI "\fBconst\fP \fBSbVec2s\fP & \fBgetOrigin\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "\fBvoid\fP \fBsetViewportRegion\fP (\fBconst\fP \fBSbViewportRegion\fP &\fBnewRegion\fP)" .br .ti -1c .RI "\fBconst\fP \fBSbViewportRegion\fP & \fBgetViewportRegion\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "\fBvoid\fP \fBsetBackgroundColor\fP (\fBconst\fP \fBSbColor\fP &color)" .br .ti -1c .RI "\fBconst\fP \fBSbColor\fP & \fBgetBackgroundColor\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "\fBvoid\fP \fBsetBackgroundIndex\fP (\fBconst\fP int index)" .br .ti -1c .RI "int \fBgetBackgroundIndex\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "\fBvoid\fP \fBsetRGBMode\fP (\fBconst\fP SbBool \fBonOrOff\fP)" .br .ti -1c .RI "SbBool \fBisRGBMode\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "\fBvirtual\fP \fBvoid\fP \fBactivate\fP (\fBvoid\fP)" .br .ti -1c .RI "\fBvirtual\fP \fBvoid\fP \fBdeactivate\fP (\fBvoid\fP)" .br .ti -1c .RI "\fBvoid\fP \fBsetRenderCallback\fP (SoSceneManagerRenderCB *f, \fBvoid\fP *\fBconst\fP \fBuserData\fP=\fBNULL\fP)" .br .ti -1c .RI "SbBool \fBisAutoRedraw\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "\fBvoid\fP \fBsetRedrawPriority\fP (\fBconst\fP uint32_t priority)" .br .ti -1c .RI "uint32_t \fBgetRedrawPriority\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "\fBvoid\fP \fBsetAntialiasing\fP (\fBconst\fP SbBool smoothing, \fBconst\fP int \fBnumPasses\fP)" .br .ti -1c .RI "\fBvoid\fP \fBgetAntialiasing\fP (SbBool &smoothing, int &\fBnumPasses\fP) \fBconst\fP" .br .ti -1c .RI "\fBvoid\fP \fBsetGLRenderAction\fP (\fBSoGLRenderAction\fP *\fBconst\fP action)" .br .ti -1c .RI "\fBSoGLRenderAction\fP * \fBgetGLRenderAction\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "\fBvoid\fP \fBsetAudioRenderAction\fP (\fBSoAudioRenderAction\fP *\fBconst\fP action)" .br .ti -1c .RI "\fBSoAudioRenderAction\fP * \fBgetAudioRenderAction\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "\fBvoid\fP \fBsetHandleEventAction\fP (\fBSoHandleEventAction\fP *\fBhea\fP)" .br .ti -1c .RI "\fBSoHandleEventAction\fP * \fBgetHandleEventAction\fP (\fBvoid\fP) \fBconst\fP" .br .in -1c .SS "Static Public Member Functions" .in +1c .ti -1c .RI "\fBstatic\fP uint32_t \fBgetDefaultRedrawPriority\fP (\fBvoid\fP)" .br .ti -1c .RI "\fBstatic\fP \fBvoid\fP \fBenableRealTimeUpdate\fP (\fBconst\fP SbBool \fBflag\fP)" .br .ti -1c .RI "\fBstatic\fP SbBool \fBisRealTimeUpdateEnabled\fP (\fBvoid\fP)" .br .in -1c .SS "Protected Member Functions" .in +1c .ti -1c .RI "int \fBisActive\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "\fBvoid\fP \fBredraw\fP (\fBvoid\fP)" .br .in -1c .SH "Detailed Description" .PP The \fBSoSceneManager\fP 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\&. .PP 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 render area class\&. .SH "Constructor & Destructor Documentation" .PP .SS "SoSceneManager::SoSceneManager (\fBvoid\fP)" Constructor\&. Sets up default \fBSoGLRenderAction\fP and \fBSoHandleEventAction\fP instances\&. .SS "SoSceneManager::~SoSceneManager ()\fC [virtual]\fP" Destructor\&. .SH "Member Function Documentation" .PP .SS "\fBvoid\fP SoSceneManager::render (\fBconst\fP SbBool clearwindow = \fCTRUE\fP, \fBconst\fP SbBool clearzbuffer = \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 "\fBvoid\fP SoSceneManager::render (\fBSoGLRenderAction\fP * action, \fBconst\fP SbBool initmatrices = \fCTRUE\fP, \fBconst\fP SbBool clearwindow = \fCTRUE\fP, \fBconst\fP SbBool clearzbuffer = \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 \fBv2\&.1\fP API\&. .br .PP \fBSince\fP .RS 4 Coin \fB2\&.0\fP .RE .PP .SS "\fBvoid\fP SoSceneManager::setCamera (\fBSoCamera\fP * camera)" Sets the camera to be used\&. .SS "\fBSoCamera\fP * SoSceneManager::getCamera (\fBvoid\fP) const" Returns the current camera\&. .SS "SbBool SoSceneManager::processEvent (\fBconst\fP \fBSoEvent\fP *\fBconst\fP event)\fC [virtual]\fP" Process the given event by applying an \fBSoHandleEventAction\fP on the scene graph\&. .SS "\fBvoid\fP SoSceneManager::reinitialize (\fBvoid\fP)" Reinitialize after parameters affecting the OpenGL context have changed\&. .SS "\fBvoid\fP SoSceneManager::scheduleRedraw (\fBvoid\fP)" 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 "\fBvoid\fP SoSceneManager::setSceneGraph (\fBSoNode\fP *\fBconst\fP sceneroot)\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 its reference count decreased by 1\&. .PP \fBSee also\fP .RS 4 \fBgetSceneGraph()\fP .RE .PP .SS "\fBSoNode\fP * SoSceneManager::getSceneGraph (\fBvoid\fP) const\fC [virtual]\fP" Returns pointer to root of scene graph\&. .SS "\fBvoid\fP SoSceneManager::setWindowSize (\fBconst\fP \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 (i\&.e\&. the rectangle which redraws are confined to) will stay the same\&. .PP \fBSee also\fP .RS 4 \fBsetViewportRegion()\fP .RE .PP .SS "\fBconst\fP \fBSbVec2s\fP & SoSceneManager::getWindowSize (\fBvoid\fP) const" Returns the current render action window size\&. .PP \fBSee also\fP .RS 4 \fBsetWindowSize()\fP .RE .PP .SS "\fBvoid\fP SoSceneManager::setSize (\fBconst\fP \fBSbVec2s\fP & newsize)" Set size of rendering area for the viewport within the current window\&. .SS "\fBconst\fP \fBSbVec2s\fP & SoSceneManager::getSize (\fBvoid\fP) const" Returns size of render area\&. .SS "\fBvoid\fP SoSceneManager::setOrigin (\fBconst\fP \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 "\fBconst\fP \fBSbVec2s\fP & SoSceneManager::getOrigin (\fBvoid\fP) const" Returns origin of rendering area viewport\&. .PP \fBSee also\fP .RS 4 \fBsetOrigin()\fP .RE .PP .SS "\fBvoid\fP SoSceneManager::setViewportRegion (\fBconst\fP \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 "\fBconst\fP \fBSbViewportRegion\fP & SoSceneManager::getViewportRegion (\fBvoid\fP) const" Returns current viewport region used by the render action and the event handling\&. .PP \fBSee also\fP .RS 4 \fBsetViewportRegion()\fP .RE .PP .SS "\fBvoid\fP SoSceneManager::setBackgroundColor (\fBconst\fP \fBSbColor\fP & color)" Sets color of rendering canvas\&. .SS "\fBconst\fP \fBSbColor\fP & SoSceneManager::getBackgroundColor (\fBvoid\fP) const" Returns color used for clearing the rendering area before rendering the scene\&. .SS "\fBvoid\fP SoSceneManager::setBackgroundIndex (\fBconst\fP int index)" Set index of background color in the color lookup table if rendering in color index mode\&. .PP Note: color index mode is not supported yet in Coin\&. .SS "int SoSceneManager::getBackgroundIndex (\fBvoid\fP) const" Returns index of colormap for background filling\&. .PP \fBSee also\fP .RS 4 \fBsetBackgroundIndex()\fP .RE .PP .SS "\fBvoid\fP SoSceneManager::setRGBMode (\fBconst\fP SbBool yes)" Turn RGB truecolor mode on or off\&. If you turn truecolor mode off, colorindex mode will be used instead\&. .SS "SbBool SoSceneManager::isRGBMode (\fBvoid\fP) const" Returns the 'truecolor or colorindex' mode flag\&. .SS "\fBvoid\fP SoSceneManager::activate (\fBvoid\fP)\fC [virtual]\fP" Activate rendering and event handling\&. Default is \fCoff\fP\&. .SS "\fBvoid\fP SoSceneManager::deactivate (\fBvoid\fP)\fC [virtual]\fP" Deactivate rendering and event handling\&. .SS "\fBvoid\fP SoSceneManager::setRenderCallback (SoSceneManagerRenderCB * f, \fBvoid\fP *\fBconst\fP userdata = \fC\fBNULL\fP\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 (\fBvoid\fP) 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 "\fBvoid\fP SoSceneManager::setRedrawPriority (\fBconst\fP uint32_t priority)" 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 (\fBvoid\fP) const" Returns value of priority on the redraw sensor\&. .SS "\fBvoid\fP SoSceneManager::setAntialiasing (\fBconst\fP SbBool smoothing, \fBconst\fP int numpasses)" Turn antialiased rendering on or off\&. .PP See documentation for \fBSoGLRenderAction::setSmoothing()\fP and \fBSoGLRenderAction::setNumPasses()\fP\&. .SS "\fBvoid\fP SoSceneManager::getAntialiasing (SbBool & smoothing, int & numpasses) const" Returns rendering pass information\&. .PP \fBSee also\fP .RS 4 \fBsetAntialiasing()\fP .RE .PP .SS "\fBvoid\fP SoSceneManager::setGLRenderAction (\fBSoGLRenderAction\fP *\fBconst\fP action)" Set the \fIaction\fP to use for rendering\&. Overrides the default action made in the constructor\&. .SS "\fBSoGLRenderAction\fP * SoSceneManager::getGLRenderAction (\fBvoid\fP) const" Returns pointer to render action\&. .SS "\fBvoid\fP SoSceneManager::setAudioRenderAction (\fBSoAudioRenderAction\fP *\fBconst\fP action)" Set the \fIaction\fP to use for rendering audio\&. Overrides the default action made in the constructor\&. .SS "\fBSoAudioRenderAction\fP * SoSceneManager::getAudioRenderAction (\fBvoid\fP) const" Returns pointer to audio render action\&. .SS "\fBvoid\fP 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 (\fBvoid\fP) const" Returns pointer to event handler action\&. .SS "uint32_t SoSceneManager::getDefaultRedrawPriority (\fBvoid\fP)\fC [static]\fP" Returns the default priority of the redraw sensor\&. .PP \fBSee also\fP .RS 4 \fBSoDelayQueueSensor\fP, \fBsetRedrawPriority()\fP .RE .PP .SS "\fBvoid\fP SoSceneManager::enableRealTimeUpdate (\fBconst\fP SbBool flag)\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 (\fBvoid\fP)\fC [static]\fP" Returns whether or not we automatically notifies everything connected to the \fCrealTime\fP field after a redraw\&. .SS "int SoSceneManager::isActive (\fBvoid\fP) const\fC [protected]\fP" Returns the \fIactive\fP flag\&. .SS "\fBvoid\fP SoSceneManager::redraw (\fBvoid\fP)\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\&.