SoSceneManager(3)
๐ SoSceneManager(3) ๐
Library Functions Manual โจ okay so bestie, pull up a chair, we're reading about SoSceneManager(3) today and honestly? it's giving main character energy for the whole Coin scene graph / GUI toolkit relationship ๐
๐ธ NAME ๐ธ
SoSceneManager โ the SoSceneManager class provides the main interface between the scene graph and the GUI toolkit. no cap, that's literally its whole job ๐ซถ
โจ SYNOPSIS โจ
#include <Inventor/SoSceneManager.h>
๐ Public Member Functions ๐
SoSceneManager (void)
virtual ~SoSceneManager ()
virtual void render (const SbBool clearwindow=1, const SbBool
clearzbuffer=1)
virtual void render (SoGLRenderAction *action, const SbBool
initmatrices=1, const SbBool clearwindow=1, const SbBool
clearzbuffer=1)
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)
๐ Friends ๐
class SoSceneManagerP
๐ Detailed Description ๐
The SoSceneManager class provides the main interface between the scene graph and the GUI toolkit. periodt ๐
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. it's giving matchmaker but for your scene graph and your toolkit fr fr ๐ซถ
A Coin library instance within an application will typically contain a single SoSceneManager object. The pointer for this object is stored in the GUI renderarea class. one (1) manager, that's it, that's the vibe โจ
๐ง Constructor & Destructor Documentation ๐ง
๐ SoSceneManager::SoSceneManager (void ) ๐
Constructor. Sets up default SoGLRenderAction and SoHandleEventAction instances. like it's literally building you the starter pack ๐ฅ
References getDefaultRedrawPriority(), and SoDB::isInitialized().
๐ SoSceneManager::~SoSceneManager () [virtual] ๐
Destructor. the goodbye era ๐ญ
References setSceneGraph().
๐ Member Function Documentation ๐
๐
void SoSceneManager::render (const SbBool clearwindow = 1, const SbBool clearzbuffer = 1) [virtual]
Okay bestie, this is the classic render call. It renders the scene graph. If clearwindow is TRUE, it clears the rendering buffer before drawing. If clearzbuffer is TRUE, it clears the depth buffer values before rendering. Both of these args should normally be TRUE, but you can set them to FALSE to optimize for special cases โ e.g. when doing wireframe rendering, you don't need a depth buffer. Lowkey iconic.
- References:
SoAudioDevice::instance(), andrender(). - Referenced by:
render().
โจ void SoSceneManager::render (SoGLRenderAction * action, const SbBool initmatrices = 1, const SbBool clearwindow = 1, const SbBool clearzbuffer = 1) [virtual]
This one is the thread-safe rendering method. Since only one thread can use an SoGLRenderAction, this method lets you supply your own thread-specific SoGLRenderAction to render 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
- References:
SoGLRenderAction::addPreRenderCallback(),SoAction::apply(),SoDB::getGlobalField(),SbTime::getTimeOfDay(),SoField::getTypeId(),SoDelayQueueSensor::isScheduled(), andSoDebugError::postInfo().
๐ฆ SbBool SoSceneManager::processEvent (const SoEvent *const event) [virtual]
Feed it an event, bestie: this processes the given event by applying an SoHandleEventAction on the scene graph.
- References:
SoState::getDepth(),SoAction::getState(), andSoDebugError::post().
๐ธ void SoSceneManager::reinitialize (void )
Reinitialize after parameters affecting the OpenGL context have changed. Basically a little reset moment when the context shifts.
๐ void SoSceneManager::scheduleRedraw (void )
Redraw at the first opportunity as the 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 โ so spam it if you want, it's still one redraw, periodt.
- References:
getRedrawPriority(),isActive(), andSoDebugError::postInfo().
๐ 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 its reference count decreased by 1.
See also: getSceneGraph()
- References:
SoBase::unref(). - Referenced by:
~SoSceneManager().
๐ SoNode * SoSceneManager::getSceneGraph (void ) const [virtual]
Returns a pointer to the root of the scene graph. Your main character node, fr fr.
๐ 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()
- References:
SoDebugError::postInfo(), andSbViewportRegion::setWindowSize().
โญ 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.
- References:
SbViewportRegion::getViewportOriginPixels(),SoDebugError::postInfo(), andSbViewportRegion::setViewportPixels().
๐ง const SbVec2s & SoSceneManager::getSize (void ) const
Returns size of render area. Simple, clean, slay.
๐ซ void SoSceneManager::setOrigin (const SbVec2s & newOrigin)
Set only the origin of the viewport region within the rendering window.
See also: setViewportRegion(), setWindowSize()
- References:
SbViewportRegion::getViewportSizePixels(),SoDebugError::postInfo(), andSbViewportRegion::setViewportPixels().
๐ซถ 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()
- References:
SbViewportRegion::getViewportOriginPixels(),SbViewportRegion::getViewportSizePixels(),SbViewportRegion::getWindowSize(), andSoDebugError::postInfo().
โจ 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. Give it a vibe.
๐
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 flag)
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. (Yes, that's the original spelling, bestie.)
๐ช 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.
- Referenced by:
scheduleRedraw().
โจ 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.
- References:
SoGLRenderAction::invalidateState(), andSoGLRenderAction::setViewportRegion().
๐ 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.
- References:
SoAction::invalidateState().
๐ 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.
- References:
SoGLRenderAction::getViewportRegion(), andSoHandleEventAction::setViewportRegion().
๐ฎ 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()
- Referenced by:
SoSceneManager().
โฐ 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.
- Referenced by:
scheduleRedraw().
๐ 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.
Okay bestie, that's the whole page. This was Coin, version 2.5.0, and this is the SoSceneManager(3) manual. The footer didn't give a date, so we're rolling with the version โ periodt. ๐โจ
๐ฆ where this page comes from
- fedora 43: Coin2-devel 2.5.0-52.fc43 ยท GPL-2.0-only
- fedora 43: Coin2-devel 2.5.0-52.fc43 ยท GPL-2.0-only
- fedora 44: Coin2-devel 2.5.0-54.fc44 ยท GPL-2.0-only
- fedora 44: Coin2-devel 2.5.0-54.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