SoXtRenderArea(Widgetparent=NULL,constchar*name=NULL,SbBoolbuildInsideParent=TRUE,SbBoolgetMouseInput=TRUE,SbBoolgetKeyboardInput=TRUE)~SoXtRenderArea()
Constructor which is passed arguments which tell it whether to register the mouse and keyboard devices
by default (SoXtMouse and SoXtKeyboard).
virtualvoidsetSceneGraph(SoNode*newScene)virtualSoNode*getSceneGraph()
Set/get the scene graph to be rendered in this component's window.
voidsetOverlaySceneGraph(SoNode*newScene)SoNode*getOverlaySceneGraph()
Sets/gets the scene graph to render in the overlay bit planes.
Note: since the overlay bit planes are in color index mode, single buffer with a limited number of
colors, the user should limit rendering in the overlay planes to simple objects.
Typically rendering in color index mode is done using the SoColorIndex node with a SoLightModel set to
BASE_COLOR.
voidregisterDevice(SoXtDevice*)voidunregisterDevice(SoXtDevice*)
Register/unregister interest in devices. When a device is registered, events from that device will be
processed by the render area, and passed into the scene graph. Events from unregistered devices will
be ignored.
voidsetBackgroundColor(constSbColor&c)constSbColor&getBackgroundColor()const
Set/get the background color for this window. Default is black (0,0,0).
voidsetBackgroundIndex(intindex)intgetBackgroundIndex()const
Sets/gets the window background color when in color index mode. (default to black (index 0)).
voidsetOverlayBackgroundIndex(intindex)intgetOverlayBackgroundIndex()const
Sets/gets the overlay window background color index. (default to 0 (clear color)).
voidsetColorMap(intstartIndex,intnum,constSbColor*colors)
Sets the colors to use when displaying in color index mode. This will load the color map with the
given colors at the starting index.
voidsetOverlayColorMap(intstartIndex,intnum,constSbColor*colors)
Sets the colors to use for overlay bit planes.This will load the color map with the given colors at
the starting index.
voidsetViewportRegion(constSbViewportRegion&newRegion)constSbViewportRegion&getViewportRegion()const
Sets/gets current viewport region to use for rendering
voidsetTransparencyType(SoGLRenderAction::TransparencyTypetype)SoGLRenderAction::TransparencyTypegetTransparencyType()const
Set/get the quality level for rendering transparent objects. See SoGLRenderAction for possible
transparency types.
voidsetAntialiasing(SbBoolsmoothing,intnumPasses)voidgetAntialiasing(SbBool&smoothing,int&numPasses)const
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.
voidsetClearBeforeRender(SbBooltrueOrFalse)SbBoolisClearBeforeRender()const
Enable/prevent window clearing from happening before a rendering starts (default is clear TRUE). This
can be useful to limit flickering when doing single buffering and geometry covers the entire window
(used in the material editor).
voidsetClearBeforeOverlayRender(SbBooltrueOrFalse)SbBoolisClearBeforeOverlayRender()const
Enable/prevent overlay window clearing from happening before a rendering starts (default is clear
TRUE).
voidsetAutoRedraw(SbBooltrueOrFalse)SbBoolisAutoRedraw()const
The render area will automatically redraw whenever something in the scene graph changes. Passing FALSE
will disable this feature.
voidsetRedrawPriority(uint32_tpriority)uint32_tgetRedrawPriority()conststaticuint32_tgetDefaultRedrawPriority()
Sets/gets the priority of the redraw sensor and get the default priority number.
voidrender()voidrenderOverlay()
Calling this forces the render area to be redrawn now. It is not necessary to call this method if auto
redraw is enabled (which is the default).
voidscheduleRedraw()voidscheduleOverlayRedraw()
Schedule a redraw to happen sometime soon (as opposed to immediately). This can be used to compress
multiple redraws.
voidredrawOnSelectionChange(SoSelection*s)voidredrawOverlayOnSelectionChange(SoSelection*s)
Call this convenience method to have this render area redraw whenever the selection list changes in
the passed node. This is useful if using a highlight render action like the SoBoxHighlightRenderAction
to correctly render whenever the selection changes. Pass NULL to turn this off.
voidsetEventCallback(SoXtRenderAreaEventCB*fcn,void*userData=NULL)
X events which occur in the render area window are either directly handled by the viewer (when this is
really a viewer) or automatically translated to SoEvents, then passed into the scene graph (via the
SoHandleEventAction) so that live scene graph objects can handle the event (when viewers are not in
viewing mode). This method allows the application to register a callback for handling events that
occur in the window, instead of sending them to the viewers or down the graph. The callback is passed
the X event, and should return TRUE if it handled the event. If the callback returns FALSE, then the
event will be handled by the render area.
voidsetGLRenderAction(SoGLRenderAction*ra)SoGLRenderAction*getGLRenderAction()const
Sets/gets the GL render action to use. This is used to set selection highlighting with the
SoBoxHighlightRenderAction and SoLineHighlightRenderAction classes.
voidsetOverlayGLRenderAction(SoGLRenderAction*ra)SoGLRenderAction*getOverlayGLRenderAction()const
Sets/gets the GL render action for the overlay window.
voidsetSceneManager(SoSceneManager*sm)SoSceneManager*getSceneManager()constvoidsetOverlaySceneManager(SoSceneManager*sm)SoSceneManager*getOverlaySceneManager()const
Sets/gets the normal and overlay plane scene managers.
Note: for convenience most of the SoSceneManager methods have already been added to this class.