Debian Codegraph @

doc/man/man3/ivm/interaction/SoSceneManager.ivm

raw
1 NAME SoSceneManager "SoSceneMgr" "" { manages scene graph rendering and event handling }
2
3 INCLUDE SoSceneManager.h
4
5 DESC { \cSoSceneManager\. provides Inventor rendering and event handling
6 inside a window provided by the caller.
7 The scene manager is able to render in only a portion of a window if desired.
8 The \cSoXtRenderArea\. class employs a \cSoSceneManager\.,
9 and handles most all the details for setting up a window,
10 converting X events to Inventor events, automatically redrawing
11 the scene when necessary, and so on.
12 It is simplest to use a render area when rendering in an entire window.
13 The \cSoSceneManager\. class is available for programmers not working
14 with the \eInventor Xt Component and Utility Library\..
15 }
16
17 TYPEDEF void SoSceneManagerRenderCB "(void *userData, SoSceneManager *mgr)"
18
19 METHOD "" SoSceneManager() {}
20 METHOD "" ~SoSceneManager() {
21 Constructor and destructor.
22 }
23
24 METHOD "" virtual void render(SbBool clearWindow = TRUE, SbBool clearZbuffer = TRUE) {
25 Apply an \cSoGLRenderAction\. to the scene graph managed here.
26 The caller is responsible for setting up a window to render into.
27 If \aclearWindow\. is \eTRUE\., this clears the graphics window before rendering.
28 If \aclearZbuffer\. is \eTRUE\., the z buffer will be cleared before rendering.
29 }
30
31 METHOD "processEv" virtual SbBool processEvent(const SoEvent *event) {
32 Process the passed event by applying an \cSoHandleEventAction\.
33 to the scene graph managed here. Returns TRUE if the event was
34 handled by a node.
35 }
36
37 METHOD "reinit" void reinitialize() {
38 Reinitialize graphics. This should be called, for instance, when
39 there is a new window.
40 }
41
42 METHOD "" void scheduleRedraw() {
43 Schedule a redraw for some time in the near future.
44 If there is no render callback set, or this is not active,
45 no redraw will be scheduled.
46 }
47
48 METHOD "setScene" virtual void setSceneGraph(SoNode *newScene) {}
49 METHOD "getScene" virtual SoNode * getSceneGraph() const {
50 Set and get the scene graph which is managed here. This is the
51 Inventor scene which will be traversed for rendering and event
52 processing.
53 }
54
55 METHOD "setWinSize" void setWindowSize(const SbVec2s &newSize) {}
56 METHOD "getWinSize" const SbVec2s & getWindowSize() const {
57 Set and get the size of the window in which the scene manager should render.
58 This size must be set before
59 \+\mrender()\. and \mprocessEvent()\.\.
60 \-\mSoSceneMgrRender()\. and \mSoSceneMgrProcessEv()\.\.
61 are called.
62 }
63
64 METHOD "" void setSize(const SbVec2s &newSize) {}
65 METHOD "" const SbVec2s & getSize() const {}
66 METHOD "" void setOrigin(const SbVec2s &newOrigin) {}
67 METHOD "" const SbVec2s & getOrigin() const {
68 Set and get the size and origin of the viewport within the window.
69 Default is to render the entire window region. The origin (0,0) is
70 the lower left corner of the window.
71 }
72
73
74 METHOD "setBkgCol" void setBackgroundColor(const SbColor &c) {}
75 METHOD "getBkgCol" const SbColor & getBackgroundColor() const {
76 Set and get the window background color when in RGB mode.
77 This is the color the scene manager viewport is cleared to when
78 \+\mrender()\.\.
79 \-\mSoSceneMgrRender()\.\.
80 is called with \aclearWindow\. set to \eTRUE\..
81 Default is black (0,0,0).
82 }
83
84 METHOD "setBkgInd" void setBackgroundIndex(int index) {}
85 METHOD "getBkgInd" int getBackgroundIndex() const {
86 Set and get the window background color when in color index mode.
87 This is the color the scene manager viewport is cleared to when
88 \+\mrender()\.\.
89 \-\mSoSceneMgrRender()\.\.
90 is called with \aclearWindow\. set to \eTRUE\..
91 Default is black (index 0).
92 }
93
94 METHOD "" void setRGBMode(SbBool onOrOff) {}
95 METHOD "" SbBool isRGBMode() const {
96 Set and get the color mode (TRUE \(em RGB mode, FALSE \(em color map mode).
97 Default is RGB mode. Only a subset of Inventor nodes will render
98 correctly in color map mode. Basically, when in color index mode,
99 lighting should be turned off (the \vmodel\. field of \cSoLightModel\.
100 should be set to \e\+BASE_COLOR\.\-SO_L_MODEL_BASE_COLOR\.\.),
101 and the \cSoColorIndex\. node should be used to specify colors.
102 }
103
104 METHOD "" virtual void activate() {}
105 METHOD "" virtual void deactivate() {
106 Activate and deactivate the scene manager.
107 The scene manager will only employ sensors for automatic redraw
108 while it is active. Typically, the scene manager should be activated
109 whenever its window is visible on the screen, and deactivated
110 when its window is closed or iconified.
111 }
112
113 METHOD "setRenderCB" void setRenderCallback(
114 SoSceneManagerRenderCB *f,
115 void *userData = NULL) {
116 The render callback provides a mechanism for automatically redrawing
117 the scene in response to changes in the scene graph.
118 The scene manager employs a sensor to monitor scene graph changes.
119 When the sensor is triggered, the render callback registered here
120 is invoked. The callback should set up its graphics window, then
121 call the scene manager
122 \+\mrender()\. method.\.
123 \-\mSoSceneMgrRender()\. function.\.
124 If the callback is set to NULL
125 (the default), auto-redraw is turned off.
126 }
127
128 METHOD "" SbBool isAutoRedraw() const {
129 Returns \eTRUE\. if there is currently a render callback registered.
130 }
131
132 METHOD "" void setRedrawPriority(uint32_t priority) {}
133 METHOD "" uint32_t getRedrawPriority() const {}
134 METHOD "" static uint32_t getDefaultRedrawPriority() {
135 Set and get the priority of the redraw sensor. Sensors are
136 processed based on priority, with priority values of 0
137 processed immediately. The default priority for the scene
138 manager redraw sensor is 10000.
139 }
140
141 METHOD enableRTUpdate static void enableRealTimeUpdate(SbBool flag) {}
142 METHOD isRTUpdate static SbBool isRealTimeUpdateEnabled()
143 {
144 Enable/Disable the realTime global field update which normally
145 happen right after a redraw.
146 }
147
148
149 METHOD "" void setAntialiasing(SbBool smoothing, int numPasses) {}
150 METHOD "" void getAntialiasing(SbBool &smoothing, int &numPasses) const
151 {
152 Set/get the antialiasing for rendering. There are two kinds of
153 antialiasing available: smoothing and multipass antialiasing.
154 If \asmoothing\. is set to TRUE, smoothing is enabled.
155 Smoothing uses OpenGL's line- and point-smoothing features
156 to provide cheap antialiasing of lines and points.
157 The value of \anumPasses\. controls multipass antialiasing. Each time
158 a render action is applied, Inventor renders the scene \anumPasses\.
159 times from slightly different camera positions, averaging the results.
160 \anumPasses\. can be from one to 255, inclusive. Setting \anumPasses\. to
161 one disables multipass antialiasing. You can use either, both, or neither
162 of these antialiasing techniques. By default, both smoothing and
163 multipass antialiasing are disabled.
164 }
165
166 ALSO { SoXtRenderArea, SoGLRenderAction, SoHandleEventAction }