SOSCENEMANAGER(3iv)
SoSceneManager(3IV) π β¨
okay bestie, welcome to the SoSceneManager page from the SoSceneManager(3IV) manual β yes that's the whole vibe, it's giving "the manual is named after the class", iconic honestly π
β¨ NAME β¨
SoSceneManager β manages scene graph rendering and event handling π
𧬠INHERITS FROM π§¬
SoSceneManager
(no cap, it just inherits from itself, it's that self-sufficient queen π)
πΈ SYNOPSIS πΈ
#include <Inventor/SoSceneManager.h>
typedef void SoSceneManagerRenderCB(void *userData, SoSceneManager
*mgr)
Methods from class SoSceneManager:
SoSceneManager()
~SoSceneManager()
virtual void render(SbBool clearWindow = TRUE, SbBool clearZbuffer
= TRUE)
virtual SbBool processEvent(const SoEvent *event)
void reinitialize()
void scheduleRedraw()
virtual void setSceneGraph(SoNode *newScene)
virtual SoNode * getSceneGraph() const
void setWindowSize(const SbVec2s &newSize)
const SbVec2s & getWindowSize() const
void setSize(const SbVec2s &newSize)
const SbVec2s & getSize() const
void setOrigin(const SbVec2s &newOrigin)
const SbVec2s & getOrigin() const
void setBackgroundColor(const SbColor &c)
const SbColor & getBackgroundColor() const
void setBackgroundIndex(int index)
int getBackgroundIndex() const
void setRGBMode(SbBool onOrOff)
SbBool isRGBMode() const
virtual void activate()
virtual void deactivate()
void setRenderCallback(SoSceneManagerRenderCB *f, void
*userData = NULL)
SbBool isAutoRedraw() const
void setRedrawPriority(uint32_t priority)
uint32_t getRedrawPriority() const
static uint32_t getDefaultRedrawPriority()
static void enableRealTimeUpdate(SbBool flag)
static SbBool isRealTimeUpdateEnabled()
void setAntialiasing(SbBool smoothing, int numPasses)
void getAntialiasing(SbBool &smoothing, int &numPasses)
const
π DESCRIPTION π
So SoSceneManager literally gives you Inventor rendering and event handling inside a window that you, the caller, provide. It's not doing the window setup for you β it's the main character who shows up and does the rendering, but you have to hand it a stage π
The scene manager can render in only a portion of a window if that's the vibe you want. And listen β the SoXtRenderArea class employs a SoSceneManager, and it handles basically all the details for setting up a window, converting X events to Inventor events, automatically redrawing the scene when necessary, and so on. So if you're rendering in an entire window, it is simplest to use a render area. fr fr, don't make extra work for yourself bestie π«Ά
The SoSceneManager class is available for programmers not working with the Inventor Xt Component and Utility Library. iykyk β¨
π οΈ METHODS π οΈ
SoSceneManager() / ~SoSceneManager()
Constructor and destructor. the birth and the departure, the full arc π«
virtual void render(SbBool clearWindow = TRUE, SbBool clearZbuffer = TRUE)
Apply an SoGLRenderAction to the scene graph managed here. Heads up: the caller is responsible for setting up a window to render into β that's on you, bestie, no takebacks π
If clearWindow is TRUE, this clears the graphics window before rendering. If clearZbuffer is TRUE, the z buffer will be cleared before rendering. Both default to TRUE, so by default it's a full fresh-start moment β¨
virtual SbBool processEvent(const SoEvent *event)
Process the passed event by applying an SoHandleEventAction to the scene graph managed here. Returns TRUE if the event was handled by a node. So you get a little yes/no receipt on whether somebody caught it π¬
void reinitialize()
Reinitialize graphics. This should be called, for instance, when there is a new window. new window, new me, same scene manager π¦
void scheduleRedraw()
Schedule a redraw for some time in the near future. β°
But listen β if there is no render callback set, or this is not active, no redraw will be scheduled. It's not ignoring you on purpose, it literally has nothing to work with π
virtual void setSceneGraph(SoNode *newScene) / virtual SoNode * getSceneGraph() const
Set and get the scene graph which is managed here. This is the Inventor scene which will be traversed for rendering and event processing. This is, like, the whole point of the thing π
void setWindowSize(const SbVec2s &newSize) / const SbVec2s & getWindowSize() const
Set and get the size of the window in which the scene manager should render.
This size must be set beforerender()andprocessEvent()are called. Not optional, not negotiable, set it first bestie π¨
void setSize(const SbVec2s &newSize) / const SbVec2s & getSize() const / void setOrigin(const SbVec2s &newOrigin) / const SbVec2s & getOrigin() const
Set and get the size and origin of the viewport within the window. Default is to render the entire window region (full glam, no cropping π
). The origin (0,0) is the lower left corner of the window.
void setBackgroundColor(const SbColor &c) / const SbColor & getBackgroundColor() const
Set and get the window background color when in RGB mode. This is the color the scene manager viewport is cleared to when render() is called with clearWindow set to TRUE. Default is black (0,0,0). classic, timeless, never misses π€
void setBackgroundIndex(int index) / int getBackgroundIndex() const
Set and get the window background color when in color index mode. This is the color the scene manager viewport is cleared to when render() is called with clearWindow set to TRUE. Default is black (index 0).
void setRGBMode(SbBool onOrOff) / SbBool isRGBMode() const
Set and get the color mode (TRUE β RGB mode, FALSE β color map mode). Default is RGB mode.
β οΈ Only a subset of Inventor nodes will render correctly in color map mode. Basically, when in color index mode, lighting should be turned off (themodelfield ofSoLightModelshould be set toBASE_COLOR), and theSoColorIndexnode should be used to specify colors. Don't skip this step or it's gonna look a mess π
virtual void activate() / virtual void deactivate()
Activate and deactivate the scene manager. The scene manager will only employ sensors for automatic redraw while it is active β it's dormant otherwise, napping π€
Typically, the scene manager should be activated whenever its window is visible on the screen, and deactivated when its window is closed or iconified. visible = on, hidden = off, simple as π
void setRenderCallback(SoSceneManagerRenderCB *f, void *userData = NULL)
The render callback provides a mechanism for automatically redrawing the scene in response to changes in the scene graph. β¨
The scene manager employs a sensor to monitor scene graph changes. When the sensor is triggered, the render callback registered here is invoked. The callback should set up its graphics window, then call the scene manager render() method.
If the callback is set to NULL (the default), auto-redraw is turned off. no callback, no autopilot π
SbBool isAutoRedraw() const
Returns TRUE if there is currently a render callback registered. a little vibe check on whether autopilot is on π
void setRedrawPriority(uint32_t priority) / uint32_t getRedrawPriority() const / static uint32_t getDefaultRedrawPriority()
Set and get the priority of the redraw sensor. Sensors are processed based on priority, with priority values of 0 processed immediately. The default priority for the scene manager redraw sensor is 10000. π
static void enableRealTimeUpdate(SbBool flag) / static SbBool isRealTimeUpdateEnabled()
Enable/Disable the realTime global field update which normally happen right after a redraw. π
void setAntialiasing(SbBool smoothing, int numPasses) / void getAntialiasing(SbBool &smoothing, int &numPasses) const
Set/get the antialiasing for rendering. There are two kinds of antialiasing available: smoothing and multipass antialiasing. β¨
- If
smoothingis set toTRUE, smoothing is enabled. Smoothing uses OpenGL's line- and point-smoothing features to provide cheap antialiasing of lines and points. budget-friendly glow-up π - The value of
numPassescontrols multipass antialiasing. Each time a render action is applied, Inventor renders the scenenumPassestimes from slightly different camera positions, averaging the results.numPassescan be fromoneto255, inclusive. SettingnumPassestoonedisables multipass antialiasing.
You can use either, both, or neither of these antialiasing techniques. By default, both smoothing and multipass antialiasing are disabled. choose your own adventure, bestie π
π SEE ALSO π
SoXtRenderArea, SoGLRenderAction, SoHandleEventAction
go read those too, they're all connected, it's a whole friend group π«Ά
okay that's the page!! and a lil sign-off: this whole thing is SoSceneManager(3IV), and the footer at the bottom just says SoSceneManager(3IV)() β no version number, no date, nothing. empty parentheses. it said "no thoughts, head empty" π so I can't tell you when this dropped or what version it is, because the page literally doesn't say. mystery era, we love that for it πβ¨
π¦ where this page comes from
- debian bookworm: inventor-doc 2.1.5-10+dfsg-2 Β· LGPL-2.0-or-later
- debian trixie: inventor-doc 2.1.6+ds-2 Β· LGPL-2.0-or-later
- ubuntu jammy: inventor-doc 2.1.5-10-24
- ubuntu noble: inventor-doc 2.1.5-10+dfsg-2.1build2 Β· LGPL-2.0-or-later
- ubuntu questing: inventor-doc 2.1.6+ds-2
- ubuntu resolute: inventor-doc 2.1.6.1+ds-1 Β· LGPL-2.0-or-later
- ubuntu stonking: inventor-doc 2.1.6.1+ds-1 Β· LGPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms