SoSceneManager(3IV)
SoSceneManager (SoSceneMgr) - manages scene graph rendering and event handling
Showing IRIX 6.5.30 (default release). Added in IRIX 6.5.22.
NAME SoSceneManager (SoSceneMgr) - manages scene graph rendering and event handling INHERITS FROM SoSceneManager SYNOPSIS #include <Inventor_c/SoSceneManager.h> typedef void SoSceneManagerRenderCB(void *userData, SoSceneManager *mgr) typedef SoSceneManager SoSceneMgr Functions from class SoSceneManager: SoSceneManager * SoSceneMgrCreate() void SoSceneMgrDelete(SoSceneMgr *this) void SoSceneMgrRender(SoSceneMgr *this, SbBool clearWindow = TRUE, SbBool clearZbuffer = TRUE) SbBool SoSceneMgrProcessEv(SoSceneMgr *this, const SoEvent *event) void SoSceneMgrReinit(SoSceneMgr *this) void SoSceneMgrScheduleRedraw(SoSceneMgr *this) void SoSceneMgrSetScene(SoSceneMgr *this, SoNode *newScene) SoNode * SoSceneMgrGetScene(const SoSceneMgr *this) void SoSceneMgrSetWinSize(SoSceneMgr *this, const SbVec2s *newSize) const SbVec2s * SoSceneMgrGetWinSize(const SoSceneMgr *this) void SoSceneMgrSetSize(SoSceneMgr *this, const SbVec2s *newSize) const SbVec2s * SoSceneMgrGetSize(const SoSceneMgr *this) void SoSceneMgrSetOrigin(SoSceneMgr *this, const SbVec2s *newOrigin) const SbVec2s * SoSceneMgrGetOrigin(const SoSceneMgr *this) void SoSceneMgrSetBkgCol(SoSceneMgr *this, const SbColor *c) const SbColor * SoSceneMgrGetBkgCol(const SoSceneMgr *this) void SoSceneMgrSetBkgInd(SoSceneMgr *this, int index) int SoSceneMgrGetBkgInd(const SoSceneMgr *this) void SoSceneMgrSetRGBMode(SoSceneMgr *this, SbBool onOrOff) SbBool SoSceneMgrIsRGBMode(const SoSceneMgr *this) void SoSceneMgrActivate(SoSceneMgr *this) void SoSceneMgrDeactivate(SoSceneMgr *this) void SoSceneMgrSetRenderCB(SoSceneMgr *this, SoSceneManagerRenderCB *f, void *userData = NULL) SbBool SoSceneMgrIsAutoRedraw(const SoSceneMgr *this) void SoSceneMgrSetRedrawPriority(SoSceneMgr *this, uint32_t priority) uint32_t SoSceneMgrGetRedrawPriority(const SoSceneMgr *this) uint32_t SoSceneMgrGetDefaultRedrawPriority() void SoSceneMgrEnableRTUpdate(SbBool flag) SbBool SoSceneMgrIsRTUpdate() void SoSceneMgrSetAntialiasing(SoSceneMgr *this, SbBool smoothing, int numPasses) void SoSceneMgrGetAntialiasing(const SoSceneMgr *this, SbBool *smoothing, int *numPasses) DESCRIPTION SoSceneManager provides Inventor rendering and event handling inside a window provided by the caller. The scene manager is able to render in only a portion of a window if desired. The SoXtRenderArea class employs a SoSceneManager, and handles most all the details for setting up a window, converting X events to Inventor events, automatically redrawing the scene when necessary, and so on. It is simplest to use a render area when rendering in an entire window. The SoSceneManager class is available for programmers not working with the Inventor Xt Component and Utility Library. FUNCTIONS SoSceneManager * SoSceneMgrCreate() void SoSceneMgrDelete(SoSceneMgr *this) Constructor and destructor. void SoSceneMgrRender(SoSceneMgr *this, SbBool clearWindow = TRUE, SbBool clearZbuffer = TRUE) Apply an SoGLRenderAction to the scene graph managed here. The caller is responsible for setting up a window to render into. If clearWindow is TRUE, this clears the graphics window before rendering. If clearZbuffer is TRUE, the z buffer will be cleared before rendering. SbBool SoSceneMgrProcessEv(SoSceneMgr *this, 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. void SoSceneMgrReinit(SoSceneMgr *this) Reinitialize graphics. This should be called, for instance, when there is a new window. void SoSceneMgrScheduleRedraw(SoSceneMgr *this) Schedule a redraw for some time in the near future. If there is no render callback set, or this is not active, no redraw will be scheduled. void SoSceneMgrSetScene(SoSceneMgr *this, SoNode *newScene) SoNode * SoSceneMgrGetScene(const SoSceneMgr *this) Set and get the scene graph which is managed here. This is the Inventor scene which will be traversed for rendering and event processing. void SoSceneMgrSetWinSize(SoSceneMgr *this, const SbVec2s *newSize) const SbVec2s * SoSceneMgrGetWinSize(const SoSceneMgr *this) Set and get the size of the window in which the scene manager should render. This size must be set before SoSceneMgrRender() and SoSceneMgrProcessEv() are called. void SoSceneMgrSetSize(SoSceneMgr *this, const SbVec2s *newSize) const SbVec2s * SoSceneMgrGetSize(const SoSceneMgr *this) void SoSceneMgrSetOrigin(SoSceneMgr *this, const SbVec2s *newOrigin) const SbVec2s * SoSceneMgrGetOrigin(const SoSceneMgr *this) Set and get the size and origin of the viewport within the window. Default is to render the entire window region. The origin (0,0) is the lower left corner of the window. void SoSceneMgrSetBkgCol(SoSceneMgr *this, const SbColor *c) const SbColor * SoSceneMgrGetBkgCol(const SoSceneMgr *this) Set and get the window background color when in RGB mode. This is the color the scene manager viewport is cleared to when SoSceneMgrRender() is called with clearWindow set to TRUE. Default is black (0,0,0). void SoSceneMgrSetBkgInd(SoSceneMgr *this, int index) int SoSceneMgrGetBkgInd(const SoSceneMgr *this) Set and get the window background color when in color index mode. This is the color the scene manager viewport is cleared to when SoSceneMgrRender() is called with clearWindow set to TRUE. Default is black (index 0). void SoSceneMgrSetRGBMode(SoSceneMgr *this, SbBool onOrOff) SbBool SoSceneMgrIsRGBMode(const SoSceneMgr *this) 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 (the model field of SoLightModel should be set to SO_L_MODEL_BASE_COLOR), and the SoColorIndex node should be used to specify colors. void SoSceneMgrActivate(SoSceneMgr *this) void SoSceneMgrDeactivate(SoSceneMgr *this) Activate and deactivate the scene manager. The scene manager will only employ sensors for automatic redraw while it is active. Typically, the scene manager should be activated whenever its window is visible on the screen, and deactivated when its window is closed or iconified. void SoSceneMgrSetRenderCB(SoSceneMgr *this, 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 SoSceneMgrRender() function. If the callback is set to NULL (the default), auto-redraw is turned off. SbBool SoSceneMgrIsAutoRedraw(const SoSceneMgr *this) Returns TRUE if there is currently a render callback registered. void SoSceneMgrSetRedrawPriority(SoSceneMgr *this, uint32_t priority) uint32_t SoSceneMgrGetRedrawPriority(const SoSceneMgr *this) uint32_t SoSceneMgrGetDefaultRedrawPriority() 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. void SoSceneMgrEnableRTUpdate(SbBool flag) SbBool SoSceneMgrIsRTUpdate() Enable/Disable the realTime global field update which normally happen right after a redraw. void SoSceneMgrSetAntialiasing(SoSceneMgr *this, SbBool smoothing, int numPasses) void SoSceneMgrGetAntialiasing(const SoSceneMgr *this, SbBool *smoothing, int *numPasses) Set/get the antialiasing for rendering. There are two kinds of antialiasing available: smoothing and multipass antialiasing. If smoothing is set to TRUE, smoothing is enabled. Smoothing uses OpenGL's line- and point-smoothing features to provide cheap antialiasing of lines and points. The value of numPasses controls multipass antialiasing. Each time a render action is applied, Inventor renders the scene numPasses times from slightly different camera positions, averaging the results. numPasses can be from one to 255, inclusive. Setting numPasses to one disables multipass antialiasing. You can use either, both, or neither of these antialiasing techniques. By default, both smoothing and multipass antialiasing are disabled. SEE ALSO SoXtRenderArea, SoGLRenderAction, SoHandleEventAction