GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  SOXTRENDERAREA (3)

NAME

SoXtRenderArea — Xt Component for rendering Inventor scene graphs

CONTENTS

Inherits From
Synopsis
Description
Methods
Resources
See Also

INHERITS FROM

SoXtComponent > SoXtGLWidget > SoXtRenderArea

SYNOPSIS

#include <Inventor/Xt/SoXtRenderArea.h>

    typedef SbBool    
                    
typedef SbBool       SoXtRenderAreaEventCB(void *userData, XAnyEvent *anyevent)

Methods from class SoXtRenderArea:

       
                          
                           SoXtRenderArea(Widget parent = NULL, const char *name = NULL, SbBool buildInsideParent = TRUE, SbBool getMouseInput = TRUE, SbBool getKeyboardInput = TRUE)    
   
                          
                           ~SoXtRenderArea()    
virtual void    
                          
virtual void               setSceneGraph(SoNode *newScene)    
virtual SoNode *    
                          
virtual SoNode *           getSceneGraph()    
void    
                          
void                       setOverlaySceneGraph(SoNode *newScene)    
SoNode *    
                          
SoNode *                   getOverlaySceneGraph()    
void    
                          
void                       registerDevice(SoXtDevice *)    
void    
                          
void                       unregisterDevice(SoXtDevice *)    
void    
                          
void                       setBackgroundColor(const SbColor &c)    
const SbColor &    
                          
const SbColor &            getBackgroundColor() const    
void    
                          
void                       setBackgroundIndex(int index)    
int    
                          
int                        getBackgroundIndex() const    
void    
                          
void                       setOverlayBackgroundIndex(int index)    
int    
                          
int                        getOverlayBackgroundIndex() const    
void    
                          
void                       setColorMap(int startIndex, int num, const SbColor *colors)    
void    
                          
void                       setOverlayColorMap(int startIndex, int num, const SbColor *colors)    
void    
                          
void                       setViewportRegion(const SbViewportRegion &newRegion)    
const SbViewportRegion &    
                          
const SbViewportRegion &   getViewportRegion() const    
void    
                          
void                       setTransparencyType(SoGLRenderAction::TransparencyType type)    
SoGLRenderAction::TransparencyType    
                          
SoGLRenderAction::TransparencyType getTransparencyType() const    
void    
                          
void                       setAntialiasing(SbBool smoothing, int numPasses)    
void    
                          
void                       getAntialiasing(SbBool &smoothing, int &numPasses) const    
void    
                          
void                       setClearBeforeRender(SbBool trueOrFalse)    
SbBool    
                          
SbBool                     isClearBeforeRender() const    
void    
                          
void                       setClearBeforeOverlayRender(SbBool trueOrFalse)    
SbBool    
                          
SbBool                     isClearBeforeOverlayRender() const    
void    
                          
void                       setAutoRedraw(SbBool trueOrFalse)    
SbBool    
                          
SbBool                     isAutoRedraw() const    
void    
                          
void                       setRedrawPriority(uint32_t priority)    
uint32_t    
                          
uint32_t                   getRedrawPriority() const    
static uint32_t    
                          
static uint32_t            getDefaultRedrawPriority()    
void    
                          
void                       render()    
void    
                          
void                       renderOverlay()    
void    
                          
void                       scheduleRedraw()    
void    
                          
void                       scheduleOverlayRedraw()    
void    
                          
void                       redrawOnSelectionChange(SoSelection *s)    
void    
                          
void                       redrawOverlayOnSelectionChange(SoSelection *s)    
void    
                          
void                       setEventCallback(SoXtRenderAreaEventCB *fcn, void *userData = NULL)    
void    
                          
void                       setGLRenderAction(SoGLRenderAction *ra)    
SoGLRenderAction *    
                          
SoGLRenderAction *         getGLRenderAction() const    
void    
                          
void                       setOverlayGLRenderAction(SoGLRenderAction *ra)    
SoGLRenderAction *    
                          
SoGLRenderAction *         getOverlayGLRenderAction() const    
void    
                          
void                       setSceneManager(SoSceneManager *sm)    
SoSceneManager *    
                          
SoSceneManager *           getSceneManager() const    
void    
                          
void                       setOverlaySceneManager(SoSceneManager *sm)    
SoSceneManager *    
                          
SoSceneManager *           getOverlaySceneManager() const

Methods from class SoXtGLWidget:

    void    
                    
void                 setBorder(SbBool onOrOff)    
SbBool    
                    
SbBool               isBorder() const    
virtual void    
                    
virtual void         setDoubleBuffer(SbBool onOrOff)    
SbBool    
                    
SbBool               isDoubleBuffer()    
Window    
                    
Window               getNormalWindow()    
Window    
                    
Window               getOverlayWindow()    
GLXContext    
                    
GLXContext           getNormalContext()    
GLXContext    
                    
GLXContext           getOverlayContext()    
Widget    
                    
Widget               getNormalWidget()    
Widget    
                    
Widget               getOverlayWidget()    
virtual void    
                    
virtual void         setNormalVisual(XVisualInfo *vis)    
XVisualInfo *    
                    
XVisualInfo *        getNormalVisual()    
virtual void    
                    
virtual void         setOverlayVisual(XVisualInfo *vis)    
XVisualInfo *    
                    
XVisualInfo *        getOverlayVisual()    
void    
                    
void                 setDrawToFrontBufferEnable(SbBool enableFlag)    
SbBool    
                    
SbBool               isDrawToFrontBufferEnable() const

Methods from class SoXtComponent:

    virtual void    
                        
virtual void             show()    
virtual void    
                        
virtual void             hide()    
SbBool    
                        
SbBool                   isVisible()    
Widget    
                        
Widget                   getWidget() const    
SbBool    
                        
SbBool                   isTopLevelShell() const    
Widget    
                        
Widget                   getShellWidget() const    
Widget    
                        
Widget                   getParentWidget() const    
void    
                        
void                     setSize(const SbVec2s &size)    
SbVec2s    
                        
SbVec2s                  getSize()    
Display *    
                        
Display *                getDisplay()    
void    
                        
void                     setTitle(const char *newTitle)    
const char *    
                        
const char *             getTitle() const    
void    
                        
void                     setIconTitle(const char *newIconTitle)    
const char *    
                        
const char *             getIconTitle() const    
void    
                        
void                     setWindowCloseCallback(SoXtComponentCB *func, void *data = NULL)    
static SoXtComponent *    
                        
static SoXtComponent *   getComponent(Widget w)    
const char *    
                        
const char *             getWidgetName() const    
const char *    
                        
const char *             getClassName() const

DESCRIPTION

This class provides Inventor rendering and event handling inside a GLX Motif widget. There is a routine to specify the scene to render. The scene is automatically rendered whenever anything under it changes (a data sensor is attached to the root of the scene), unless explicitly told not to do so (manual redraws). Users can also set Inventor rendering attributes such as the transparency type, antialiasing on or off, etc. This class employs an SoSceneManager to manage rendering and event handling.

X events that occur in the render area can be handled by the application, by the viewer (if this is really a viewer) or by the nodes in the scene graph. When an event occurs, it is first passed to the application event callback function registered with the setEventCallback() method on SoXtRenderArea. If this function does not exist or returns FALSE, the X event is either used directly by the viewer or translated to an SoEvent for further scene graph processing. If the viewer does not handle the event, and an overlay scene graph exists, the SoEvent is sent to that scene graph by way of an SoHandleEventAction. If no node in the overlay scene graph handles the event (i.e., calls setHandled() on the SoHandleEventAction), the SoEvent is passed to the normal scene graph in the same manner.

METHODS

       
                          
                           SoXtRenderArea(Widget parent = NULL, const char *name = NULL, SbBool buildInsideParent = TRUE, SbBool getMouseInput = TRUE, SbBool getKeyboardInput = TRUE)    
   
                          
                           ~SoXtRenderArea()
Constructor which is passed arguments which tell it whether to register the mouse and keyboard devices by default (SoXtMouse and SoXtKeyboard).

    virtual void    
                          
virtual void               setSceneGraph(SoNode *newScene)    
virtual SoNode *    
                          
virtual SoNode *           getSceneGraph()
Set/get the scene graph to be rendered in this component’s window.

    void    
                          
void                       setOverlaySceneGraph(SoNode *newScene)    
SoNode *    
                          
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.

    void    
                          
void                       registerDevice(SoXtDevice *)    
void    
                          
void                       unregisterDevice(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.

    void    
                          
void                       setBackgroundColor(const SbColor &c)    
const SbColor &    
                          
const SbColor &            getBackgroundColor() const
Set/get the background color for this window. Default is black (0,0,0).

    void    
                          
void                       setBackgroundIndex(int index)    
int    
                          
int                        getBackgroundIndex() const
Sets/gets the window background color when in color index mode. (default to black (index 0)).

    void    
                          
void                       setOverlayBackgroundIndex(int index)    
int    
                          
int                        getOverlayBackgroundIndex() const
Sets/gets the overlay window background color index. (default to 0 (clear color)).

    void    
                          
void                       setColorMap(int startIndex, int num, const SbColor *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.

    void    
                          
void                       setOverlayColorMap(int startIndex, int num, const SbColor *colors)
Sets the colors to use for overlay bit planes.This will load the color map with the given colors at the starting index.

    void    
                          
void                       setViewportRegion(const SbViewportRegion &newRegion)    
const SbViewportRegion &    
                          
const SbViewportRegion &   getViewportRegion() const
Sets/gets current viewport region to use for rendering

    void    
                          
void                       setTransparencyType(SoGLRenderAction::TransparencyType type)    
SoGLRenderAction::TransparencyType    
                          
SoGLRenderAction::TransparencyType getTransparencyType() const
Set/get the quality level for rendering transparent objects. See SoGLRenderAction for possible transparency types.

    void    
                          
void                       setAntialiasing(SbBool smoothing, int numPasses)    
void    
                          
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 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.

    void    
                          
void                       setClearBeforeRender(SbBool trueOrFalse)    
SbBool    
                          
SbBool                     isClearBeforeRender() 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).

    void    
                          
void                       setClearBeforeOverlayRender(SbBool trueOrFalse)    
SbBool    
                          
SbBool                     isClearBeforeOverlayRender() const
Enable/prevent overlay window clearing from happening before a rendering starts (default is clear TRUE).

    void    
                          
void                       setAutoRedraw(SbBool trueOrFalse)    
SbBool    
                          
SbBool                     isAutoRedraw() const
The render area will automatically redraw whenever something in the scene graph changes. Passing FALSE will disable this feature.

    void    
                          
void                       setRedrawPriority(uint32_t priority)    
uint32_t    
                          
uint32_t                   getRedrawPriority() const    
static uint32_t    
                          
static uint32_t            getDefaultRedrawPriority()
Sets/gets the priority of the redraw sensor and get the default priority number.

    void    
                          
void                       render()    
void    
                          
void                       renderOverlay()
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).

    void    
                          
void                       scheduleRedraw()    
void    
                          
void                       scheduleOverlayRedraw()
Schedule a redraw to happen sometime soon (as opposed to immediately). This can be used to compress multiple redraws.

    void    
                          
void                       redrawOnSelectionChange(SoSelection *s)    
void    
                          
void                       redrawOverlayOnSelectionChange(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.

    void    
                          
void                       setEventCallback(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.

    void    
                          
void                       setGLRenderAction(SoGLRenderAction *ra)    
SoGLRenderAction *    
                          
SoGLRenderAction *         getGLRenderAction() const
Sets/gets the GL render action to use. This is used to set selection highlighting with the SoBoxHighlightRenderAction and SoLineHighlightRenderAction classes.

    void    
                          
void                       setOverlayGLRenderAction(SoGLRenderAction *ra)    
SoGLRenderAction *    
                          
SoGLRenderAction *         getOverlayGLRenderAction() const
Sets/gets the GL render action for the overlay window.

    void    
                          
void                       setSceneManager(SoSceneManager *sm)    
SoSceneManager *    
                          
SoSceneManager *           getSceneManager() const    
void    
                          
void                       setOverlaySceneManager(SoSceneManager *sm)    
SoSceneManager *    
                          
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.

RESOURCES



*SoXtRenderArea*BackgroundColor: black (color name or hex value)

SEE ALSO

SoXtGLWidget, SoXtComponent, SoXtViewer, SoSceneManager, SoBoxHighlightRenderAction, SoLineHighlightRenderAction

Search for    or go to Top of page |  Section 3 |  Main Index


SOXTRENDERAREA(3IV) (-->)

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.