Salome HOME
0023124: EDF 11219 GEOM: Ray tracing in the OCC viewer
[modules/gui.git] / doc / salome / gui / input / occ_3d_viewer.doc
1 /*!
2
3 \page occ_3d_viewer_page OCC 3D Viewer
4
5 <h2>Operations</h2>
6
7 The functionalities of OCC viewer are available via its Viewer
8 Toolbar. Buttons marked with small downward triangles have extended
9 functionality which can be accessed by locking on them with left mouse
10 button.
11
12 \image html occviewer_toolbar.png
13 <hr>
14
15 \image html occ_view_camera_dump.png
16
17 <b>Dump View</b> - exports an object from the viewer in bmp, png or
18 jpeg image format.
19 <hr>
20
21 \image html occ_view_style_switch.png
22
23 <b>Interaction style switch</b> - allows to switch between standard
24 and "keyboard free" interaction styles. "Keyboard free" style allows
25 to process all view transformations without using keyboard (only by
26 mouse) and perform selection in view by pressing "S" key. By default,
27 rotation in this mode is performed by left mouse button, panning - by
28 middle mouse button, zooming - by left and middle mouse buttons
29 pressed simultaneously.
30 <hr>
31
32 \image html occ_view_zooming_style_switch.png
33
34 <b>Zooming style switch</b> - allows to switch between standard
35 (zooming at the center of the view) and advanced (zooming at the
36 current cursor position) zooming styles.
37 <hr>
38
39 \image html occ_view_triedre.png
40
41 <b>Show/Hide Trihedron</b> - shows or hides coordinate axes.
42 <hr>
43
44 \image html occ_view_preselection.png
45
46 <b>Enable/Disable preselection</b> - enables or disables preselection (highlighting) in the view.
47 <hr>
48
49 \image html occ_view_selection.png
50
51 <b>Enable/Disable selection</b> - enables or disables selection in the view.
52 <hr>
53
54 \image html occ_view_fitall.png
55
56 <b>Fit all</b> - allows to select a point to be the center of a scene
57 representing all displayed objects in the visible area.
58 <hr>
59
60 \image html occ_view_fitarea.png
61
62 <b>Fit area</b> - resizes the view to place in the visible area only
63 the contents of a frame drawn with pressed left mouse button.
64 <hr>
65
66 \image html occ_view_fitselection.png
67
68 <b>Fit selection</b> - fits view contents to the current selection.
69 <hr>
70
71 \image html occ_view_zoom.png
72
73 <b>Zoom</b> - allows to zoom in and out.
74 <hr>
75
76 \image html occ_view_pan.png
77
78 <b>Panning</b> - if the represented objects are greater that the
79 visible area and you don't wish to use <b>Fit all</b> functionality,
80 click on this button and you'll be able to drag the scene to see its
81 remote parts.
82 <hr>
83
84 \image html occ_view_glpan.png
85
86 <b>Global panning</b> - represents all displayed objects in the
87 visible area.
88 <hr>
89
90 \image html occ_view_rotation_point.png
91
92 <b>Change rotation point</b> - allows to to choose the point around
93 which the rotation is performed.
94
95 \image html set_rotation_point_dialog1.png
96
97 By default the rotation point is located in the Center of the bounding
98 box of an object.
99
100 \image html set_rotation_point_dialog2.png
101
102 Disabling <b>Use Bounding Box Center</b> check-box allows you to
103 define the coordinates of the rotation point manually.
104
105 - <b>Set to Origin</b> button restores the default rotation point
106   coordinates.
107
108 - <b>Gravity Center of Selected Object</b> button allows using the gravity center of the object selected in the viewer as the center of the rotation point. 
109 When you click this button, you should first choose the type of selectable object: Point, Edge, Face or Solid and only then proceed with selection in the viewer.
110
111 <hr>
112
113 \image html occ_view_rotate.png
114
115 <b>Rotation</b> - allows to rotate the selected object using the
116 mouse.
117 <hr>
118
119 \image html occ_view_front.png
120 \image html occ_view_back.png
121 \image html occ_view_top.png
122 \image html occ_view_bottom.png
123 \image html occ_view_left.png
124 \image html occ_view_right.png
125
126 These buttons orientate the scene strictly about coordinate axes:
127 \b Front, \b Back, \b Top, \b Bottom, \b Left or \b Right side.
128 <hr>
129
130 \image html occ_view_anticlockwise.png
131
132 <b>Rotate counterclockwise</b> - rotates view 90 @htmlonly &deg; @endhtmlonly counterclockwise.
133 <hr>
134
135 \image html occ_view_clockwise.png
136
137 <b>Rotate clockwise</b> - rotates view 90 @htmlonly &deg; @endhtmlonly clockwise.
138 <hr>
139
140 \image html occ_view_orthographic.png
141
142 <b>Ortographic projection</b> - default OCC viewer projection mode.
143 <hr>
144
145 \image html occ_view_perspective.png
146
147 <b>Perspective projection</b> - perspective OCC viewer projection mode.
148 <hr>
149
150 \image html occ_view_stereo.png
151
152 <b>Stereo projection</b> - stereoscopic rendering of the view.
153 \note Activation of this mode also switches the view to perpective projection 
154 in case if the orthographic one has been active.
155 \note By default, quad-buffered stereo is activated, if it is supported by the graphic card. 
156 If no stereo capabilities are available, an error message is shown.
157 \note The stereoscopic view settings can be defined in 
158 \ref occ_preferences "OCC 3D Viewer" preferences.
159
160 <hr>
161
162 \image html occ_view_reset.png
163
164 <b>Reset</b> - restores the default position (isometric) of objects in
165 the scene.
166 <hr>
167
168 \image html occ_view_shoot.png
169
170 <b>Memorise view</b> - saves the current position of objects in the
171 scene.
172 <hr>
173
174 \image html occ_view_presets.png
175
176 <b>Restore view</b> - restores the saved position of objects in the
177 scene.
178 <hr>
179
180 \image html occ_view_clone.png
181
182 <b>Clone view</b> - opens a new duplicate scene.
183 <hr>
184
185 \anchor clipping_planes
186
187 \b Clipping allows creating cross-section views (clipping planes)
188 of your mesh.
189
190 To create a clipping plane, click on the \b New button in the dialog and choose how it is  definition by \b Absolute or \b Relative coordinates.
191
192 <b>Absolute Coordinates</b>
193
194 \image html Clipping_Absolute.png
195
196 - <b>Base point</b> - allows defining the coordinates of the base
197   point for the clipping plane.
198
199   - <b>Reset</b> - returns the base point to coordinate origin.
200
201 - <b>Direction</b> - allows defining the orientation of the
202   clipping plane.
203
204         - <b>Invert</b> - allows selecting, which part of the object will be
205     removed and which will remain after clipping.
206     
207 <b>Relative mode</b>  
208
209 \image html Clipping_Relative.png
210
211 - \b Orientation ( ||X-Y, ||X-Z or ||Y-Z).
212
213 - \b Distance between the opposite extremities of the boundary box of 
214 selected objects, if it is set to 0.5 the boundary box is split in two halves.
215
216 - \b Rotation (in angle degrees) <b>around X</b> (Y to Z) and <b>around 
217 Y</b> (X to Z) (depending on the chosen Orientation)
218
219 The other parameters are available in both modes : 
220 - <b>Preview</b> check-box shows the clipping plane in the <b>3D Viewer</b>.
221 - <b>Auto Apply</b> check-box shows button is on, you can preview the
222 cross-section in the <b>3D Viewer</b>.
223
224 It is also possible to interact  with the clipping plane directly in 3D 
225 view using the mouse. 
226
227 <hr>
228
229 \image html occ_view_scaling.png
230
231 <b>Scaling</b> - represents objects deformed (stretched or stuffed)
232 along the axes of coordinates.
233 <hr>
234
235 \image html occ_view_graduated_axes.png
236
237 <b>Graduated axes</b> - allows to define axes parameters and graduate
238 them.
239
240 \image html graduatedaxes2.png
241
242 - <b>Axis name</b> - if checked the axis name is displayed in the viewer.
243
244   - <b>Name</b> - allows to redefine the axis name.
245
246   - <b>Font</b> - allows to define the font color of the axis name.
247
248 - <b>Labels</b> - if checked the labels are displayed in the viewer.
249
250   - <b>Number</b> - allows to define the number of labels.
251
252   - <b>Offset</b> - allows to define the distance between labels.
253
254   - <b>Font</b> - allows to define the font color of labels names.
255
256 - <b>Tick marks</b> - if checked the tick marks are displayed in the viewer.
257
258   - <b>Length</b> - allows to define the length of tick marks.
259
260 - <b>Is visible</b> - if checked the axis is displayed in the viewer.
261
262 <hr>
263
264 \image html occ_view_ambient.png
265
266 <b>Toggle ambient light</b> - toggle "keep only ambient light" flag
267 on/off.
268 <hr>
269
270 \image html occ_view_minimized.png
271 \image html occ_view_maximized.png
272
273 <b>Minimize/Maximize</b> - these buttons allow switching the current
274 view area to the minimized / maximized state.
275 <hr>
276
277 \image html occ_view_return_3d_view.png
278
279 <b>Return to 3D</b> - this button switches from 2D view projection back to the 3D view mode.
280 <hr>
281
282 \image html occ_view_sync.png
283
284 <b>Synchronize view</b> - allows to synchronize 3d view
285 parameters. This button has two states - checked and
286 unchecked. Clicking on this button opens a drop-down menu listing the
287 compatible 3d views. As soon as the user selects any view from the
288 list, the parameters (view point, position, zoom coefficient, etc.) of
289 the current view are synchronized with the selected view (static
290 synchronization).
291
292 In addition, when this button is in the "checked" state, the dynamic
293 synchronization of the views is performed, i.e. any zoom, pan, rotate
294 or other view operation done in one view is automatically applied to
295 the other view.
296 <hr>
297
298 \image html occ_view_ray_tracing.png
299
300 \anchor ray_tracing
301
302 <b>Ray tracing</b> - allows to switch between rendering methods in run-time 
303 in the current OCCT 3D view. It can be used to produce images with photorealistic quality.
304
305 \image html doc_ray_tracing.png
306
307 - <b>Ray tracing</b> - specifies rendering mode: OpenGL rasterization (by default) or GPU ray-tracing.
308
309   - <b>Depth</b> - defines maximum ray-tracing depth.
310   
311   - <b>Specular reflections</b> - enables/disables specular reflections.
312   
313   - <b>Adaptive anti-aliasing</b> - enables/disables adaptive anti-aliasing.
314     
315   - <b>Shadows rendering</b> - enables/disables shadows rendering.
316   
317   - <b>Transparent shadow</b> - enables/disables light propagation through transparent media.
318   
319 <hr>
320
321 \image html occ_view_env_texture.png
322
323 \anchor env_texture
324
325 <b>Environment texture</b> - allows to set parameters for environment texture.
326 This is a special mode of texture mapping when specular reflection of environment texture 
327 is simulated by OpenGL using a special texture coordinates generation algorithm (a sphere map).
328
329 \image html doc_env_texture.png
330
331 - <b>Environment texture</b> - enables/disables environment texture in the current OCCT 3D view.
332
333 User can select one of 7 predefined environment texture from the list or define its texture from file by 
334 choosing item <b>"Custom..."</b> in a combo box.
335
336 \note Note that the environment texture file should normally satisfy the following requirements 
337 in order to produce good visual result:
338 - The image file should have 2:1 width-to-height ratio.
339 - It should constitute a 360-degrees panoramic image created using a fish-eye lens. 
340
341 <hr>
342
343 \image html occ_view_light_source.png
344
345 \anchor light_source
346
347 <b>Light source</b> - allows to set parameters for light source.
348
349 It's possible to choose a type of light source between directional and positional light.
350
351 \image html doc_dir_light_source.png
352
353 <b>Directional</b> light - creates a directional light source in the viewer.
354 It is defined by direction coordinates, color and headlight parameter.
355
356 \image html doc_pos_light_source.png
357
358 <b>Positional</b> light - creates an isolated light source X,Y,Z in the viewer. 
359 It is also defined by the color and headlight parameter.
360
361 Click:
362
363 - <b>Apply and Close</b> to apply defined light source to the OCC 3D Viewer.
364
365 - <b>Default</b> to restore default values of light source.
366
367 - <b>Close</b> to return parameters of light source on initial values.
368
369 <hr>
370 */