SoSceneManager(3)
โจ SoSceneManager โจ
okay bestie, welcome to the SoSceneManager(3) glow-up ๐
this is a page from the Library Functions Manual, and it's giving main character energy because this class is literally the bridge between ur scene graph and ur GUI toolkit. buckle up, it's a long one โ this is part 1 of 2, so don't go anywhere ๐ซถ
๐ธ NAME ๐ธ
SoSceneManager โ the SoSceneManager class provides the main interface between the scene graph and the GUI toolkit. no cap, that's literally the whole job description ๐
๐ SYNOPSIS ๐
#include <Inventor/SoSceneManager.h>
๐ Public Member Functions ๐
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 Public Member Functions โญ
static uint32_t getDefaultRedrawPriority (void)
static void enableRealTimeUpdate (const SbBool flag)
static SbBool isRealTimeUpdateEnabled (void)
๐ฆ Protected Member Functions ๐ฆ
int isActive (void) const
void redraw (void)
๐ Detailed Description ๐
okay so the SoSceneManager class provides the main interface between the scene graph and the GUI toolkit. that's the whole vibe ๐ซถ
the renderarea class from whichever GUI toolkit you're using is the one that reaches out and uses this class as its interface against the scene graph. and the main functions of the class? handling events, and giving you "hooks" to do rendering. iconic behaviour honestly โจ
here's the tea: a Coin library instance inside an application will typically contain a single SoSceneManager object. just the one. the pointer for that object is stored in the GUI renderarea class. so like, one manager, one home, one destiny ๐ซ
๐ Constructor & Destructor Documentation ๐
๐ธ SoSceneManager::SoSceneManager (void ) ๐ธ
Constructor. it sets up default SoGLRenderAction and SoHandleEventAction instances, so you're not standing there with nothing to work with on day one ๐
๐ฆ SoSceneManager::~SoSceneManager () [virtual] ๐ฆ
Destructor. it's the goodbye. that's it. that's the note ๐
๐ MEMBER FUNCTION DOCUMENTATION ๐
void SoSceneManager::render (const SbBool clearwindow = TRUE, const SbBool clearzbuffer = TRUE) [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).
void SoSceneManager::render (SoGLRenderAction * action, const SbBool initmatrices = TRUE, const SbBool clearwindow = TRUE, const SbBool clearzbuffer = TRUE) [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.
Since: Coin 2.0
void SoSceneManager::setCamera (SoCamera * camera)โ Sets the camera to be used. ๐ธSoCamera * SoSceneManager::getCamera (void ) constโ Returns the current camera. ๐ฅSbBool SoSceneManager::processEvent (const SoEvent *const event) [virtual]โ Process the given event by applying anSoHandleEventActionon the scene graph. ๐ฎvoid SoSceneManager::reinitialize (void )โ Reinitialize after parameters affecting the OpenGL context has changed. ๐void SoSceneManager::scheduleRedraw (void )โ 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.
void SoSceneManager::setSceneGraph (SoNode *const sceneroot) [virtual]โ Set the node which is top of the scene graph we're managing. Thescenerootnode reference count will be increased by 1, and any previously set scene graph top node will have it's reference count decreased by 1.
See also: getSceneGraph()
SoNode * SoSceneManager::getSceneGraph (void ) const [virtual]โ Returns pointer to root of scene graph. ๐ณvoid SoSceneManager::setWindowSize (const SbVec2s & newsize)โ Update window size of ourSoGLRenderAction's viewport settings. ๐ช
Note that this will only change the information about window dimensions, the actual viewport size and origin (ie the rectangle which redraws are confined to) will stay the same.
See also: setViewportRegion()
const SbVec2s & SoSceneManager::getWindowSize (void ) constโ Returns the current render action window size. ๐
See also: setWindowSize()
void SoSceneManager::setSize (const SbVec2s & newsize)โ Set size of rendering area for the viewport within the current window. ๐ผ๏ธconst SbVec2s & SoSceneManager::getSize (void ) constโ Returns size of render area. ๐void SoSceneManager::setOrigin (const SbVec2s & newOrigin)โ Set only the origin of the viewport region within the rendering window. ๐
See also: setViewportRegion(), setWindowSize()
const SbVec2s & SoSceneManager::getOrigin (void ) constโ Returns origin of rendering area viewport. ๐งญ
See also: setOrigin()
void SoSceneManager::setViewportRegion (const SbViewportRegion & newregion)โ Update ourSoGLRenderAction's viewport settings. ๐
This will change both the information about window dimensions and the actual viewport size and origin.
See also: setWindowSize()
const SbViewportRegion & SoSceneManager::getViewportRegion (void ) constโ Returns current viewport region used by the renderaction and the event handling. ๐บ๏ธ
See also: setViewportRegion()
void SoSceneManager::setBackgroundColor (const SbColor & color)โ Sets color of rendering canvas. ๐จconst SbColor & SoSceneManager::getBackgroundColor (void ) constโ Returns color used for clearing the rendering area before rendering the scene. ๐๏ธvoid SoSceneManager::setBackgroundIndex (const int index)โ Set index of background color in the color lookup table if rendering in colorindex mode. ๐๏ธ
Note: colorindex mode is not supported yet in Coin.
int SoSceneManager::getBackgroundIndex (void ) constโ Returns index of colormap for background filling. ๐ข
See also: setBackgroundIndex()
void SoSceneManager::setRGBMode (const SbBool yes)โ Turn RGB truecolor mode on or off. If you turn truecolor mode off, colorindex mode will be used instead. ๐SbBool SoSceneManager::isRGBMode (void ) constโ Returns the "truecolor or colorindex" mode flag. ๐ฉvoid SoSceneManager::activate (void ) [virtual]โ Activate rendering and event handling. Default is off. โกvoid SoSceneManager::deactivate (void ) [virtual]โ Deactive rendering and event handling. ๐คvoid SoSceneManager::setRenderCallback (SoSceneManagerRenderCB * f, void *const userdata = NULL)โ Set the callback functionfto invoke when rendering the scene.userdatawill be passed as the first argument of the function. ๐SbBool SoSceneManager::isAutoRedraw (void ) constโ ReturnsTRUEif theSoSceneManagerautomatically 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.
void SoSceneManager::setRedrawPriority (const uint32_t priority)โ Set up the redraw priority for theSoOneShotSensorused to trigger redraws. By setting this lower than for your own sensors, you can make sure some code is always run before redraw happens. โฑ๏ธ
See also: SoDelayQueueSensor
uint32_t SoSceneManager::getRedrawPriority (void ) constโ Returns value of priority on the redraw sensor. ๐void SoSceneManager::setAntialiasing (const SbBool smoothing, const int numpasses)โ Turn antialiased rendering on or off. โจ
See documentation for SoGLRenderAction::setSmoothing() and SoGLRenderAction::setNumPasses().
void SoSceneManager::getAntialiasing (SbBool & smoothing, int & numpasses) constโ Returns rendering pass information. ๐
See also: setAntialiasing()
void SoSceneManager::setGLRenderAction (SoGLRenderAction *const action)โ Set the action to use for rendering. Overrides the default action made in the constructor. ๐ฌSoGLRenderAction * SoSceneManager::getGLRenderAction (void ) constโ Returns pointer to render action. ๐ฏvoid SoSceneManager::setAudioRenderAction (SoAudioRenderAction *const action)โ Set the action to use for rendering audio. Overrides the default action made in the constructor. ๐SoAudioRenderAction * SoSceneManager::getAudioRenderAction (void ) constโ Returns pointer to audio render action. ๐ตvoid SoSceneManager::setHandleEventAction (SoHandleEventAction * hea)โ Set the action to use for event handling. Overrides the default action made in the constructor. ๐น๏ธSoHandleEventAction * SoSceneManager::getHandleEventAction (void ) constโ Returns pointer to event handler action. ๐๏ธuint32_t SoSceneManager::getDefaultRedrawPriority (void ) [static]โ Returns the default priority of the redraw sensor. ๐
See also: SoDelayQueueSensor, setRedrawPriority()
void SoSceneManager::enableRealTimeUpdate (const SbBool flag) [static]โ Set whether or not forSoSceneManagerinstances to "touch" the globalrealTimefield after a redraw. If this is not done, redrawing when animating the scene will only happen as fast as therealTimeinterval goes (which defaults to 12 times a second). โฐ
See also: SoDB::setRealTimeInterval()
SbBool SoSceneManager::isRealTimeUpdateEnabled (void ) [static]โ Returns whether or not we automatically notifies everything connected to therealTimefield after a redraw. ๐กint SoSceneManager::isActive (void ) const [protected]โ Returns the active flag. ๐ฆvoid SoSceneManager::redraw (void ) [protected]โ Do an immediate redraw by calling the redraw callback function. ๐จ
๐ฆ AUTHOR ๐ฆ
Generated automatically by Doxygen for Coin from the source code.
And that's the whole thing, bestie. The footer says this is Coin, version 3.1.3, and the page is SoSceneManager(3). No cap, you just read the entire manual. Slay. ๐โจ๐
๐ฆ where this page comes from
- fedora 43: Coin3-devel 3.1.3-40.fc43 ยท GPL-2.0-only
- fedora 43: Coin3-devel 3.1.3-40.fc43 ยท GPL-2.0-only
- fedora 44: Coin3-devel 3.1.3-42.fc44 ยท GPL-2.0-only
- fedora 44: Coin3-devel 3.1.3-42.fc44 ยท GPL-2.0-only
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms