SoSceneManager(3)

๐Ÿ“ฆ version 3.1.3, in fedora 43, fedora 44

โœจ 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 an SoHandleEventAction on 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. The sceneroot 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.

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 our SoGLRenderAction'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 our SoGLRenderAction'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 function f to invoke when rendering the scene. userdata will be passed as the first argument of the function. ๐Ÿ“ž
  • 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.

  • void SoSceneManager::setRedrawPriority (const uint32_t priority) โ€” 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. โฑ๏ธ

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 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). โฐ

See also: SoDB::setRealTimeInterval()

  • SbBool SoSceneManager::isRealTimeUpdateEnabled (void ) [static] โ€” Returns whether or not we automatically notifies everything connected to the realTime field 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