0024637: Visualization - clean up implementation of rendering in immediate mode
[occt.git] / src / V3d / V3d_View.cdl
CommitLineData
b311480e 1-- Created on: 1992-01-15
2-- Created by: GG
3-- Copyright (c) 1992-1999 Matra Datavision
973c2be1 4-- Copyright (c) 1999-2014 OPEN CASCADE SAS
7fd59977 5--
973c2be1 6-- This file is part of Open CASCADE Technology software library.
b311480e 7--
d5f74e42 8-- This library is free software; you can redistribute it and/or modify it under
9-- the terms of the GNU Lesser General Public License version 2.1 as published
973c2be1 10-- by the Free Software Foundation, with special exception defined in the file
11-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12-- distribution for complete text of the license and disclaimer of any warranty.
b311480e 13--
973c2be1 14-- Alternatively, this file may be used under the terms of Open CASCADE
15-- commercial license or contractual agreement.
b311480e 16
7fd59977 17-- Modified: FMN - 24/12/97 -> Suppression GEOMLITE
18-- CQO - 24/12/97 -> BUC50037
19-- stt:25-02-98; S3558: ajout IfManageStandardEvent
20-- stt:08-04-98; suppr IfManageStandardEvent
21-- CAL - 18/08/98 -> S3892. Ajout grilles 3d.
22-- BGN - 16-09-98; Points d'entree du Triedre (S3819, Phase 1)
23-- 22-09-98 ; BGN : S3989 (anciennement S3819)
24-- TypeOfTriedron* from Aspect(et pas V3d)
25-- CAL - 21/10/98 -> Speciale. Ajout methode Tumble.
26-- 29-OCT-98 : DCB : Adding ScreenCopy () method.
27-- GG - 10/11/99 : PRO19603 Adding Redraw( area ) method
28-- GG - 15/12/99 : GER61351 Adding SetBackgroundColor()
29-- and BackgroundColor() methods
30-- GG - 24/01/00 : -> Remove internal PixToRef() method, use Convert()
31-- method instead.
32-- -> Rename internal RefToPix() to Convert() method.
33-- -> Add ConvertToGrid() methods,
34-- the Compute() internal method become private.
35-- -> Add SetProjModel() method.
7fd59977 36-- VKH - 15/11/99 : G004
37-- -> Add method Dump()
38-- GG - IMP210200
39-- -> Add Transparency() method
7fd59977 40-- THA - 17/08/00 Thomas HARTL <t-hartl@muenchen.matra-dtv.fr>
41-- -> Add Print method (works only under Windows).
7fd59977 42-- GG - IMP231100
43-- -> Add IsActiveLight() & IsActivePlane() methods
44-- SZV - IMP100701
45-- -> Add ToPixMap() method
46-- GG - RIC120302 Add NEW SetWindow method.
7fd59977 47-- SAV - 22/10/01
48-- -> Add EnableDepthTest() & IsDepthTestEnabled().
49-- VSV - 28/05/02: ZBUFFER mode of Trihedron
7fd59977 50-- SAV - 23/12/02 -> Added methods to set background image
7fd59977 51-- NKV - 23/07/07 -> Define custom projection and model view matrixes
7fd59977 52-- NKV - 08/02/07 -> Add ConvertWithProj() method
7fd59977 53
6942f04a 54class View from V3d inherits TShared from MMgt
7fd59977 55
56 ---Purpose: Defines the application object VIEW for the
57 -- VIEWER application.
58 -- The methods of this class allow the editing
59 -- and inquiring the parameters linked to the view.
60 -- (Projection,Mapping,Zclipping,DepthCueing,AntiAliasing
61 -- et Conversions) .
62 -- Warning: The default parameters are defined by the class
63 -- Viewer (Example : SetDefaultViewSize()).
64 -- Certain methods are mouse oriented, and it is
65 -- necessary to know the difference between the start and
66 -- the continuation of this gesture in putting the method
67 -- into operation.
68 -- Example : Shifting the eye-view along the screen axes.
69 --
70 -- View->Move(10.,20.,0.,True) (Starting motion)
71 -- View->Move(15.,-5.,0.,False) (Next motion)
72
7fd59977 73uses
74
75 -- S3892
b5ac8292 76 Pnt from gp,
77 Dir from gp,
7fd59977 78 Ax3 from gp,
79 LayerMgr from V3d,
80 ColorScale from V3d,
81 ColorScale from Aspect,
82 Array2OfReal from TColStd,
83 Grid from Aspect,
84 Handle from Aspect,
85 Structure from Graphic3d,
86 Group from Graphic3d,
87
88 ListOfTransient from V3d,
89 ListIteratorOfListOfTransient from TColStd,
90 TypeOfView from V3d,
91 TypeOfAxe from V3d,
92 TypeOfOrientation from V3d,
93 TypeOfShadingModel from V3d,
94 TypeOfSurfaceDetail from V3d,
95 TextureEnv from Graphic3d,
96 TypeOfVisualization from V3d,
97 TypeOfZclipping from V3d,
98 TypeOfProjectionModel from V3d,
99 TypeOfBackfacingModel from V3d,
b5ac8292 100 StereoDumpOptions from V3d,
7fd59977 101 Viewer from V3d,
102 Light from V3d,
7fd59977 103 View from Visual3d,
7fd59977 104 ContextView from Visual3d,
105 Vector from Graphic3d,
106 Vertex from Graphic3d,
107 Plotter from Graphic3d,
b5ac8292 108 Camera_Handle from Graphic3d,
7fd59977 109 Window from Aspect,
110 PixMap from Image,
692613e5 111 BufferType from Graphic3d,
7fd59977 112 Background from Aspect,
113 GradientBackground from Aspect,
7fd59977 114 TypeOfColor from Quantity,
115 NameOfColor from Quantity,
116 Color from Quantity,
117 Length from Quantity,
118 PlaneAngle from Quantity,
119 Parameter from Quantity,
120 Factor from Quantity,
121 Ratio from Quantity,
122 Coefficient from Quantity,
123 Coordinate from V3d,
124 Array2OfReal from TColStd,
125 ViewerPointer from V3d,
7fd59977 126 TypeOfTriedronEcho from Aspect,
127 TypeOfTriedronPosition from Aspect,
7fd59977 128 RenderingContext from Aspect,
129 GraphicCallbackProc from Aspect,
130 FillMethod from Aspect,
131 GradientFillMethod from Aspect,
eeaaaefb 132 FontAspect from Font,
13a22457 133 AsciiString from TCollection,
7edf74fd 134 ExtendedString from TCollection,
4269bd1b 135 PrintAlgo from Aspect,
136 ClipPlane_Handle from Graphic3d,
197ac94e 137 SequenceOfHClipPlane from Graphic3d,
138 XYZ from gp
7fd59977 139raises
140
6942f04a 141 BadValue from V3d, TypeMismatch from Standard,
7fd59977 142 MultiplyDefined from Standard,UnMapped from V3d
143
144is
145
6942f04a 146 Create ( VM : mutable Viewer; Type : TypeOfView from V3d = V3d_ORTHOGRAPHIC );
b5ac8292 147 ---Purpose: Initializes the view.
7fd59977 148
b5ac8292 149 Create (theVM : mutable Viewer; theView : View from V3d);
150 ---Purpose: Initializes the view by copying.
7fd59977 151
152 --------------------------------------------------------
153 ---Category: Methods to modify the Status of the view
154 --------------------------------------------------------
155
156 SetWindow ( me : mutable ; IdWin : Window )
157 ---Purpose: Activates the view in the window specified and Map the
158 -- Window to the screen.
159 raises MultiplyDefined from Standard;
160 ---Level: Public
161 ---Purpose: Warning! raises MultiplyDefined from Standard
162 -- if the view is already activated in a window.
163 -- Warning: The view is centered and resized to preserve
164 -- the height/width ratio of the window.
165
166 SetWindow ( me : mutable ;
167 aWindow : Window from Aspect;
168 aContext : RenderingContext from Aspect;
169 aDisplayCB : GraphicCallbackProc from Aspect;
170 aClientData : Address from Standard
171 )
172 ---Purpose: Activates the view in the specified Window
173 -- If <aContext> is not NULL the graphic context is used
174 -- to draw something in this view.
175 -- Otherwise an internal graphic context is created.
176 -- If <aDisplayCB> is not NULL then a user display CB is
177 -- call at the end of the OCC graphic traversal and just
178 -- before the swap of buffers. The <aClientData> is pass
179 -- to this call back.
180 raises MultiplyDefined from Standard;
181 ---Level: Public
182 ---Purpose: Warning! raises MultiplyDefined from Standard
183 -- if the view is already activated in a window.
184 -- Warning: The view is centered and resized to preserve
185 -- the height/width ratio of the window.
186
187 SetMagnify (me: mutable; IdWin : Window;
188 aPreviousView : View from V3d;
189 x1 , y1 , x2 , y2: Integer from Standard)
190 is static;
191
192 Remove ( me );
193 ---Level: Public
194 ---Purpose: Destroys the view.
195
6942f04a 196 Update ( me ) is static;
7fd59977 197 ---Level: Public
298f9ad7 198 ---Purpose: Deprecated, Redraw() should be used instead.
7fd59977 199
200 Redraw ( me );
201 ---Level: Public
202 ---Purpose: Redisplays the view even if there has not
203 -- been any modification.
204 -- Must be called if the view is shown.
205 -- (Ex: DeIconification ) .
206
679ecdee 207 RedrawImmediate ( me );
208 ---Level: Public
209 ---Purpose: Updates layer of immediate presentations.
210
211 Invalidate ( me );
212 ---Level: Public
213 ---Purpose: Invalidates view content but does not redraw it.
214
7fd59977 215 Redraw ( me ;x,y,width,height: Integer from Standard);
216 ---Level: Public
217 ---Purpose: Redisplays the view area after esxposure.
218 -- [x,y] define the min xy area position
219 -- [width,height] the size of the area in pixel unit.
220
221 MustBeResized ( me : mutable )
222 ---Level: Public
223 ---Purpose: Must be called when the window supporting the
224 -- view changes size.
225 raises UnMapped from V3d;
226 ---Purpose: if the view is not mapped on a window.
227 -- Warning: The view is centered and resized to preserve
228 -- the height/width ratio of the window.
229
230 DoMapping ( me : mutable );
231 ---Level: Advanced
232 ---Purpose: Must be called when the window supporting the
233 -- view is mapped or unmapped.
234
235 IsEmpty ( me ) returns Boolean;
236 ---Level: Public
237 ---Purpose: Returns the status of the view regarding
238 -- the displayed structures inside
239 -- Returns True is The View is empty
240
241 UpdateLights (me);
242 ---Level: Public
243 ---Purpose: Updates the lights of the view. The view is redrawn.
244
245 --------------------------------------------------------
246 ---Category: Methods to modify the Attributes of the view
247 --------------------------------------------------------
248
249 SetBackgroundColor ( me : mutable ;
250 Type : TypeOfColor; V1, V2, V3 : Parameter );
251 ---Level: Public
252 ---Purpose: Defines the background colour of the view
253 -- by supplying :
254 -- the colour definition type,
255 -- and the three corresponding values.
256
257 SetBackgroundColor ( me : mutable ; Color : Color from Quantity );
258 ---Level: Public
259 ---Purpose: Defines the background colour of the view
260 -- by supplying :
261 -- the colour object.
262
263 SetBackgroundColor ( me : mutable ; Name : NameOfColor );
264 ---Level: Public
265 ---Purpose: Defines the background colour of the view
266 -- by supplying :
267 -- the colour name in the form Quantity_NOC_xxxx .
268
269 SetBgGradientColors ( me : mutable ;
270 Color1 : Color from Quantity;
271 Color2 : Color from Quantity;
272 FillStyle : GradientFillMethod from Aspect = Aspect_GFM_HOR;
273 update : Boolean from Standard = Standard_False );
274 ---Level: Public
275 ---Purpose: Defines the gradient background colours of the view
276 -- by supplying :
f8b2ed36 277 -- two colour objects,
278 -- and fill method (horizontal by default)
7fd59977 279
280 SetBgGradientColors ( me : mutable ;
281 Color1 : NameOfColor;
282 Color2 : NameOfColor;
283 FillStyle : GradientFillMethod from Aspect = Aspect_GFM_HOR;
284 update : Boolean from Standard = Standard_False );
285 ---Level: Public
286 ---Purpose: Defines the gradient background colours of the view
287 -- by supplying :
f8b2ed36 288 -- two colour names in the form Quantity_NOC_xxxx,
289 -- and fill method (horizontal by default)
7fd59977 290
f8b2ed36 291 SetBgGradientStyle( me : mutable ;
7fd59977 292 AMethod : GradientFillMethod from Aspect = Aspect_GFM_HOR;
293 update : Boolean from Standard = Standard_False);
294 ---Level: Public
295 ---Purpose: Defines the gradient background fill method of the view
296
297 SetBackgroundImage( me : mutable; FileName : CString from Standard;
298 FillStyle : FillMethod from Aspect = Aspect_FM_CENTERED;
299 update : Boolean from Standard = Standard_False );
f8b2ed36 300 ---Level: Public
301 ---Purpose: Defines the background texture of the view
302 --- by supplying :
303 --- texture image file name,
304 --- and fill method (centered by default)
7fd59977 305
306 SetBgImageStyle( me : mutable; FillStyle : FillMethod from Aspect;
307 update : Boolean from Standard = Standard_False );
f8b2ed36 308 ---Level: Public
309 ---Purpose: Defines the textured background fill method of the view
7fd59977 310
311 SetAxis ( me : mutable; X,Y,Z : Coordinate ;
312 Vx,Vy,Vz : Parameter )
313 ---Level: Public
314 ---Purpose: Definition of an axis from its origin and
315 -- its orientation .
316 -- This will be the current axis for rotations and movements.
6942f04a 317 raises BadValue from V3d;
318 ---Purpose: Warning! raises BadValue from V3d if the vector normal is NULL. .
7fd59977 319
320 SetShadingModel ( me : mutable; Model : TypeOfShadingModel );
321 ---Level: Public
322 ---Purpose: Defines the shading model for the
323 -- visualisation ZBUFFER mode.
324 -- Various models are available.
325
326 SetSurfaceDetail(me : mutable; SurfaceDetail : TypeOfSurfaceDetail);
327 ---Level: Public
328 ---Purpose: select the kind of rendering for texture mapping
329 -- no texture mapping by default
330
331 SetTextureEnv(me : mutable; ATexture : TextureEnv from Graphic3d);
332 ---Level: Public
333 ---Purpose: set the environment texture to use
334 -- no environment texture by default
335
336 SetVisualization ( me : mutable;
337 Mode : TypeOfVisualization from V3d );
338 ---Level: Public
339 ---Purpose: Defines the visualisation mode in the view.
340
341 SetAntialiasingOn ( me : mutable );
342 ---Level: Public
343 ---Purpose: Activates antialiasing in the view.
344
345 SetAntialiasingOff ( me : mutable );
346 ---Level: Public
347 ---Purpose: Desactivates antialiasing in the view.
348
349 SetZClippingDepth ( me : mutable; Depth : Length );
350 ---Level: Public
351 ---Purpose: Defines the depth of the medium clipping plane.
352
353 SetZClippingWidth ( me : mutable; Width : Length )
354 ---Level: Public
355 ---Purpose: Defines the thicknes around the medium clippling plane. .
6942f04a 356 raises BadValue from V3d;
7fd59977 357 -- If the thickness is <= 0
358
359 SetZClippingType ( me : mutable; Type : TypeOfZclipping );
360 ---Level: Public
361 ---Purpose: Defines the type of ZClipping.
362
363 SetZCueingDepth ( me : mutable; Depth : Length );
364 ---Level: Public
365 ---Purpose: Defines the depth of the medium plane.
366
367 SetZCueingWidth ( me : mutable; Width : Length )
368 ---Level: Public
369 ---Purpose: Defines the thickness around the medium plane.
6942f04a 370 raises BadValue from V3d;
7fd59977 371 -- If thickness is <= 0
372
373 SetZCueingOn ( me : mutable );
374 ---Level: Public
375 ---Purpose: Activates ZCueing in the view.
376
377 SetZCueingOff ( me : mutable );
378 ---Level: Public
379 ---Purpose: Desactivates ZCueing in the view.
380
381 SetLightOn( me : mutable ; MyLight : Light from V3d )
382 ---Level: Public
383 ---Purpose: Activates MyLight in the view.
6942f04a 384 raises BadValue from V3d;
7fd59977 385 -- If No More Light can be activated in MyView .
386
387 SetLightOn( me : mutable )
388 ---Level: Public
389 ---Purpose: Activates all the lights defined in this view.
6942f04a 390 raises BadValue from V3d;
7fd59977 391 -- If No More Light can be activated in MyView .
392
393 SetLightOff( me : mutable ; MyLight : Light from V3d );
394 ---Level: Public
395 ---Purpose: Desactivate MyLight in this view.
396
397 SetLightOff( me : mutable );
398 ---Level: Public
399 ---Purpose: Deactivate all the Lights defined in this view.
400
4269bd1b 401 IsActiveLight( me ; aLight: Light from V3d )
7fd59977 402 returns Boolean from Standard;
403 ---Level: Public
404 ---Purpose: Returns TRUE when the light is active in this view.
405
406 SetTransparency( me : mutable ; AnActivity : Boolean = Standard_False);
407 ---Level: Public
408 ---Purpose: Activate/Deactivate the transparency in this view.
409
6942f04a 410 SetImmediateUpdate(me: mutable; theImmediateUpdate: Boolean from Standard)
411 returns Boolean from Standard;
412 ---Purpose: sets the immediate update mode and returns the previous one.
413
197ac94e 414 SetAutoZFitMode (me : mutable;
415 theIsOn : Boolean;
416 theScaleFactor : Real from Standard = 1.0);
b5ac8292 417 ---Level: public
197ac94e 418 ---Purpose: Sets the automatic z-fit mode and its parameters.
419 -- The auto z-fit has extra parameters which can controlled from application level
420 -- to ensure that the size of viewing volume will be sufficiently large to cover
421 -- the depth of unmanaged objects, for example, transformation persistent ones.
422 -- @param theScaleFactor [in] the scale factor for Z-range.
423 -- The range between Z-min, Z-max projection volume planes
424 -- evaluated by z fitting method will be scaled using this coefficient.
425 -- Program error exception is thrown if negative or zero value
426 -- is passed.
427
428 AutoZFitMode (me) returns Boolean;
b5ac8292 429 ---Level: public
197ac94e 430 ---Purpose: returns TRUE if automatic z-fit mode is turned on.
b5ac8292 431
197ac94e 432 AutoZFitScaleFactor (me) returns Real from Standard;
433 ---Level: public
434 ---Purpose: returns scale factor parameter of automatic z-fit mode.
7fd59977 435
436 ---------------------------------------------------
437 -- Triedron methods
438 ---------------------------------------------------
439
4269bd1b 440 ZBufferTriedronSetup ( me : mutable;
7fd59977 441 XColor : NameOfColor from Quantity = Quantity_NOC_RED;
442 YColor : NameOfColor from Quantity = Quantity_NOC_GREEN;
443 ZColor : NameOfColor from Quantity = Quantity_NOC_BLUE1;
444 SizeRatio : Real from Standard = 0.8;
445 AxisDiametr : Real from Standard = 0.05;
446 NbFacettes : Integer from Standard = 12)
447 is static;
448 ---Level: Advanced
449 ---Purpose: Customization of the ZBUFFER Triedron.
450 --- XColor,YColor,ZColor - colors of axis
451 --- SizeRatio - ratio of decreasing of the trihedron size when its phisical
452 --- position comes out of the view
453 --- AxisDiametr - diameter relatively to axis length
454 --- NbFacettes - number of facettes of cylinders and cones
455
456 TriedronDisplay ( me : mutable;
457 APosition : TypeOfTriedronPosition from Aspect = Aspect_TOTP_CENTER;
458 AColor : NameOfColor from Quantity = Quantity_NOC_WHITE ;
459 AScale : Real from Standard = 0.02;
460 AMode : TypeOfVisualization from V3d = V3d_WIREFRAME )
461 is static;
462 ---Level: Advanced
463 ---Purpose: Display of the Triedron.
464 --- Initialize position, color and length of Triedron axes.
465 --- The scale is a percent of the window width.
466 ---Category:
467
468 TriedronErase ( me : mutable )
469 is static;
470 ---Level: Advanced
471 ---Purpose: Erases the Triedron.
472 ---Category:
473
474 TriedronEcho ( me : mutable;
475 AType : TypeOfTriedronEcho from Aspect = Aspect_TOTE_NONE )
476 is static;
477 ---Level: Advanced
478 ---Purpose: Highlights the echo zone of the Triedron.
479 ---Category:
480
481 ---------------------------------
482 ---Category: Graduated trihedron
483 ---------------------------------
484
485 GetGraduatedTrihedron(me;
486 -- Names of axes --
13a22457 487 xname, yname, zname : out ExtendedString from TCollection;
7fd59977 488 -- Draw names --
13a22457 489 xdrawname, ydrawname, zdrawname : out Boolean from Standard;
7fd59977 490 -- Draw values --
13a22457 491 xdrawvalues, ydrawvalues, zdrawvalues : out Boolean from Standard;
7fd59977 492 -- Draw grid --
493 drawgrid : out Boolean from Standard;
494 -- Draw axes --
495 drawaxes : out Boolean from Standard;
496 -- Number of splits along axes --
13a22457 497 nbx, nby, nbz : out Integer from Standard;
7fd59977 498 -- Offset for drawing values --
13a22457 499 xoffset, yoffset, zoffset : out Integer from Standard;
7fd59977 500 -- Offset for drawing names of axes --
13a22457 501 xaxisoffset, yaxisoffset, zaxisoffset : out Integer from Standard;
7fd59977 502 -- Draw tickmarks --
13a22457 503 xdrawtickmarks, ydrawtickmarks, zdrawtickmarks : out Boolean from Standard;
7fd59977 504 -- Length of tickmarks --
13a22457 505 xtickmarklength, ytickmarklength, ztickmarklength : out Integer from Standard;
7fd59977 506 -- Grid color --
507 gridcolor : out Color from Quantity;
13a22457
S
508 -- Colors of axis names --
509 xnamecolor, ynamecolor, znamecolor : out Color from Quantity;
510 -- Colors of axis and values --
511 xcolor, ycolor, zcolor : out Color from Quantity;
7fd59977 512 -- Name of font for names of axes --
13a22457 513 fontOfNames : out AsciiString from TCollection;
7fd59977 514 -- Style of names of axes --
eeaaaefb 515 styleOfNames : out FontAspect from Font;
7fd59977 516 -- Size of names of axes --
517 sizeOfNames : out Integer from Standard;
518 -- Name of font for values --
13a22457 519 fontOfValues : out AsciiString from TCollection;
7fd59977 520 -- Style of values --
eeaaaefb 521 styleOfValues : out FontAspect from Font;
7fd59977 522 -- Size of values --
523 sizeOfValues : out Integer from Standard)
524 ---Purpose: Returns data of a graduated trihedron.
525 is static;
526
527 GraduatedTrihedronDisplay(me : mutable;
528 -- Names of axes --
13a22457
S
529 xname : ExtendedString from TCollection = "X";
530 yname : ExtendedString from TCollection = "Y";
531 zname : ExtendedString from TCollection = "Z";
7fd59977 532 -- Draw names --
533 xdrawname : Boolean from Standard = Standard_True;
534 ydrawname : Boolean from Standard = Standard_True;
535 zdrawname : Boolean from Standard = Standard_True;
536 -- Draw values --
537 xdrawvalues : Boolean from Standard = Standard_True;
538 ydrawvalues : Boolean from Standard = Standard_True;
539 zdrawvalues : Boolean from Standard = Standard_True;
540 -- Draw grid --
541 drawgrid : Boolean from Standard = Standard_True;
542 -- Draw axes --
543 drawaxes : Boolean from Standard = Standard_True;
544 -- Number of splits along axes --
545 nbx : Integer from Standard = 3;
546 nby : Integer from Standard = 3;
547 nbz : Integer from Standard = 3;
548 -- Offset for drawing values --
549 xoffset : Integer from Standard = 10;
550 yoffset : Integer from Standard = 10;
551 zoffset : Integer from Standard = 10;
552 -- Offset for drawing names of axes --
553 xaxisoffset : Integer from Standard = 30;
554 yaxisoffset : Integer from Standard = 30;
555 zaxisoffset : Integer from Standard = 30;
556 -- Draw tickmarks --
557 xdrawtickmarks : Boolean from Standard = Standard_True;
558 ydrawtickmarks : Boolean from Standard = Standard_True;
559 zdrawtickmarks : Boolean from Standard = Standard_True;
560 -- Length of tickmarks --
561 xtickmarklength : Integer from Standard = 10;
562 ytickmarklength : Integer from Standard = 10;
563 ztickmarklength : Integer from Standard = 10;
564 -- Grid color --
565 gridcolor : Color from Quantity = Quantity_NOC_WHITE;
566 -- X name color --
567 xnamecolor : Color from Quantity = Quantity_NOC_RED;
568 -- Y name color --
569 ynamecolor : Color from Quantity = Quantity_NOC_GREEN;
570 -- Z name color --
571 znamecolor : Color from Quantity = Quantity_NOC_BLUE1;
572 -- X color of axis and values --
573 xcolor : Color from Quantity = Quantity_NOC_RED;
574 -- Y color of axis and values --
575 ycolor : Color from Quantity = Quantity_NOC_GREEN;
576 -- Z color of axis and values --
577 zcolor : Color from Quantity = Quantity_NOC_BLUE1;
578 -- Name of font for names of axes --
13a22457 579 fontOfNames : AsciiString from TCollection = "Arial";
7fd59977 580 -- Style of names of axes --
eeaaaefb 581 styleOfNames : FontAspect from Font = Font_FA_Bold;
7fd59977 582 -- Size of names of axes --
583 sizeOfNames : Integer from Standard = 12;
584 -- Name of font for values --
13a22457 585 fontOfValues : AsciiString from TCollection = "Arial";
7fd59977 586 -- Style of values --
eeaaaefb 587 styleOfValues : FontAspect from Font = Font_FA_Regular;
7fd59977 588 -- Size of values --
589 sizeOfValues : Integer from Standard = 12)
590 ---Purpose: Displays a graduated trihedron.
591 is static;
592
593 GraduatedTrihedronErase(me : mutable)
594 ---Purpose: Erases a graduated trihedron from the view.
595 is static;
596
597 ---------------------------------------------------
598 -- Color Scale methods
599 ---------------------------------------------------
600
601 SetLayerMgr(me : mutable; aMgr : LayerMgr from V3d);
602
603 ColorScaleDisplay(me : mutable);
604
605 ColorScaleErase(me : mutable);
606
607 ColorScaleIsDisplayed(me)
608 returns Boolean from Standard;
609
610 ColorScale(me)
611 returns ColorScale from Aspect;
612
613 --------------------------------------------------------
614 ---Category: Methods to modify the Projection of the view
615 --------------------------------------------------------
616
617 SetFront(me: mutable);
618 ---Level: Public
619 ---Purpose: modify the Projection of the view perpendicularly to
620 -- the privileged plane of the viewer.
621
622 Rotate ( me : mutable ; Ax,Ay,Az : PlaneAngle ;
623 Start : Boolean = Standard_True )
624 ---Level: Public
625 ---Purpose: Rotates the eye about the coordinate system of
626 -- reference of the screen
627 -- for which the origin is the view point of the projection,
628 -- with a relative angular value in RADIANS with respect to
629 -- the initial position expressed by Start = Standard_True
6942f04a 630 raises BadValue from V3d;
631 ---Purpose: Warning! raises BadValue from V3d
7fd59977 632 -- If the eye, the view point, or the high point are
633 -- aligned or confused.
634
635 Rotate ( me : mutable ; Ax,Ay,Az : PlaneAngle ;
636 X,Y,Z : Coordinate ;
637 Start : Boolean = Standard_True )
638 ---Level: Public
639 ---Purpose: Rotates the eye about the coordinate system of
640 -- reference of the screen
641 -- for which the origin is Gravity point {X,Y,Z},
642 -- with a relative angular value in RADIANS with respect to
643 -- the initial position expressed by Start = Standard_True
6942f04a 644 raises BadValue from V3d;
7fd59977 645 ---Purpose: If the eye, the view point, or the high point are
646 -- aligned or confused.
647
648 Rotate ( me : mutable ; Axe : TypeOfAxe ; Angle : PlaneAngle ;
649 X,Y,Z : Coordinate ;
650 Start : Boolean = Standard_True );
651 ---Level: Public
652 ---Purpose: Rotates the eye about one of the coordinate axes of
653 -- of the view for which the origin is the Gravity point{X,Y,Z}
654 -- with an relative angular value in RADIANS with
655 -- respect to the initial position expressed by
656 -- Start = Standard_True
657
658 Rotate ( me : mutable ; Axe : TypeOfAxe ; Angle : PlaneAngle ;
659 Start : Boolean = Standard_True ) ;
660 ---Level: Public
661 ---Purpose: Rotates the eye about one of the coordinate axes of
662 -- of the view for which the origin is the view point of the
663 -- projection with an relative angular value in RADIANS with
664 -- respect to the initial position expressed by
665 -- Start = Standard_True
666
667 Rotate ( me : mutable ; Angle : PlaneAngle ;
668 Start : Boolean = Standard_True );
669 ---Level: Public
670 ---Purpose: Rotates the eye around the current axis a relative
671 -- angular value in RADIANS with respect to the initial
672 -- position expressed by Start = Standard_True
673
674 Move ( me : mutable ; Dx,Dy,Dz : Length ;
675 Start : Boolean = Standard_True )
676 ---Level: Public
677 ---Purpose: Movement of the eye parallel to the coordinate system
678 -- of reference of the screen a distance relative to the
679 -- initial position expressed by Start = Standard_True.
6942f04a 680 raises BadValue from V3d;
7fd59977 681 -- If the eye, the view point, or the high point are
682 -- aligned or confused.
683
684 Move ( me : mutable ; Axe : TypeOfAxe ; Length : Length ;
685 Start : Boolean = Standard_True )
686 ---Level: Public
687 ---Purpose: Movement of the eye parallel to one of the axes of the
688 -- coordinate system of reference of the view a distance
689 -- relative to the initial position expressed by
690 -- Start = Standard_True.
6942f04a 691 raises BadValue from V3d;
7fd59977 692 -- If the eye, view point, or high point are aligned or confused.
693
694 Move ( me : mutable ; Length : Length ;
695 Start : Boolean = Standard_True )
696 ---Level: Public
697 ---Purpose: Movement of the eye parllel to the current axis
698 -- a distance relative to the initial position
699 -- expressed by Start = Standard_True
6942f04a 700 raises BadValue from V3d;
7fd59977 701 -- If the eye, view point, or high point are aligned or confused.
702
703 Translate ( me : mutable ; Dx,Dy,Dz : Length ;
704 Start : Boolean = Standard_True )
705 ---Level: Public
706 ---Purpose: Movement of the ye and the view point parallel to the
707 -- frame of reference of the screen a distance relative
708 -- to the initial position expressed by
709 -- Start = Standard_True
6942f04a 710 raises BadValue from V3d;
7fd59977 711 -- If the eye, view point, or high point are aligned or confused.
712
713 Translate ( me : mutable ; Axe : TypeOfAxe ; Length : Length ;
714 Start : Boolean = Standard_True );
715 ---Level: Public
716 ---Purpose: Movement of the eye and the view point parallel to one
717 -- of the axes of the fame of reference of the view a
718 -- distance relative to the initial position
719 -- expressed by Start = Standard_True
720
721 Translate ( me : mutable ; Length : Length ;
722 Start : Boolean = Standard_True );
723 ---Level: Public
724 ---Purpose: Movement of the eye and view point parallel to
725 -- the current axis a distance relative to the initial
726 -- position expressed by Start = Standard_True
727
197ac94e 728 Place (me : mutable;
729 theXp : Integer from Standard;
730 theYp : Integer from Standard;
731 theZoomFactor : Factor from Quantity = 1)
7fd59977 732 ---Level: Public
197ac94e 733 ---Purpose: places the point of the view corresponding
734 -- at the pixel position x,y at the center of the window
735 -- and updates the view.
736 is static;
7fd59977 737
738 Turn ( me : mutable ; Ax,Ay,Az : PlaneAngle ;
739 Start : Boolean = Standard_True )
740 ---Level: Public
741 ---Purpose: Rotation of the view point around the frame of reference
742 -- of the screen for which the origin is the eye of the
743 -- projection with a relative angular value in RADIANS
744 -- with respect to the initial position expressed by
745 -- Start = Standard_True
6942f04a 746 raises BadValue from V3d;
7fd59977 747 -- If the eye, view point, or high point are aligned or confused.
748
749 Turn ( me : mutable ; Axe : TypeOfAxe ; Angle : PlaneAngle ;
750 Start : Boolean = Standard_True )
751 ;
752 ---Level: Public
753 ---Purpose: Rotation of the view point around one of the axes of the
754 -- frame of reference of the view for which the origin is
755 -- the eye of the projection with an angular value in
756 -- RADIANS relative to the initial position expressed by
757 -- Start = Standard_True
758
759 Turn ( me : mutable ; Angle : PlaneAngle ;
760 Start : Boolean = Standard_True );
761 ---Level: Public
762 ---Purpose: Rotation of the view point around the current axis an
763 -- angular value in RADIANS relative to the initial
764 -- position expressed by Start = Standard_True
765
766 SetTwist ( me : mutable ; Angle : PlaneAngle )
767 ---Level: Public
768 ---Purpose: Defines the angular position of the high point of
769 -- the reference frame of the view with respect to the
770 -- Y screen axis with an absolute angular value in
771 -- RADIANS.
6942f04a 772 raises BadValue from V3d;
7fd59977 773 -- If the eye, view point, or high point are aligned or confused.
774
775 SetEye( me : mutable ; X,Y,Z : Coordinate )
776 ---Level: Public
777 ---Purpose: Defines the position of the eye..
6942f04a 778 raises BadValue from V3d ;
7fd59977 779 -- If the eye, view point, or high point are aligned or confused.
780
781 SetDepth( me : mutable ; Depth : Length )
782 ---Level: Public
783 ---Purpose: Defines the Depth of the eye from the view point
784 -- without update the projection .
6942f04a 785 raises BadValue from V3d ;
7fd59977 786 -- If the Depth is <= 0.
787
788 SetProj( me : mutable ; Vx,Vy,Vz : Parameter )
789 ---Level: Public
790 ---Purpose: Defines the orientation of the projection.
6942f04a 791 raises BadValue from V3d ;
7fd59977 792 -- If the eye, view point, or high point are aligned or confused.
793
794 SetProj( me : mutable ; Orientation : TypeOfOrientation )
795 ---Level: Public
796 ---Purpose: Defines the orientation of the projection .
6942f04a 797 raises BadValue from V3d ;
7fd59977 798 -- If the eye, view point, or high point are aligned or confused.
799 -- Updates the view
800
801 SetAt( me : mutable ; X,Y,Z : Coordinate )
802 ---Level: Public
803 ---Purpose: Defines the position of the view point.
6942f04a 804 raises BadValue from V3d ;
7fd59977 805 -- If the eye, view point, or high point are aligned or confused.
806
807 SetUp( me : mutable ; Vx,Vy,Vz : Parameter )
808 ---Level: Public
809 ---Purpose: Defines the orientation of the high point.
6942f04a 810 raises BadValue from V3d ;
7fd59977 811 -- If the eye, view point, or high point are aligned or confused.
812
813 SetUp( me : mutable ; Orientation : TypeOfOrientation )
814 ---Level: Public
815 ---Purpose: Defines the orientation(SO) of the high point.
6942f04a 816 raises BadValue from V3d ;
7fd59977 817 -- If the eye, view point, or high point are aligned or confused.
818
7fd59977 819 SetViewOrientationDefault( me : mutable );
820 ---Level: Public
821 ---Purpose: Saves the current state of the orientation of the view
822 -- which will be the return state at ResetViewOrientation.
823
824 ResetViewOrientation ( me : mutable );
825 ---Level: Public
826 ---Purpose: Resets the orientation of the view.
827 -- Updates the view
828
829 --------------------------------------------------------
830 ---Category: Methods to modify the Mapping of the view
831 --------------------------------------------------------
832
197ac94e 833 Panning (me : mutable;
834 theDXv : Real from Standard;
835 theDYv : Real from Standard;
836 theZoomFactor : Factor from Quantity = 1;
837 theToStart : Boolean = Standard_True);
838 ---Level: Public
839 ---Purpose: Translates the center of the view along "x" and "y" axes of
840 -- view projection. Can be used to perform interactive panning operation.
841 -- In that case the DXv, DXy parameters specify panning relative to the
842 -- point where the operation is started.
843 -- @param theDXv [in] the relative panning on "x" axis of view projection, in view space coordinates.
844 -- @param theDYv [in] the relative panning on "y" axis of view projection, in view space coordinates.
845 -- @param theZoomFactor [in] the zooming factor.
846 -- @param theToStart [in] pass TRUE when starting panning to remember view
847 -- state prior to panning for relative arguments. If panning is started,
848 -- passing {0, 0} for {theDXv, theDYv} will return view to initial state.
849 -- Performs update of view.
850
851 SetCenter (me : mutable; theXp, theYp : Integer from Standard)
852 ---Level: Public
853 ---Purpose: Relocates center of screen to the point, determined by
854 -- {Xp, Yp} pixel coordinates relative to the bottom-left corner of
855 -- screen. To calculate pixel coordinates for any point from world
856 -- coordinate space, it can be projected using "Project".
857 -- @param theXp [in] the x coordinate.
858 -- @param theYp [in] the y coordinate.
859 raises BadValue from V3d;
860 -- If one of the dimensions of the projection is NULL.
7fd59977 861
3dfe95cd 862 SetSize ( me : mutable; theSize : Length )
7fd59977 863 ---Level: Public
3dfe95cd 864 ---Purpose: Defines the view projection size in its maximum dimension,
865 -- keeping the inital height/width ratio unchanged.
866 raises BadValue from V3d;
867 -- If <theSize> is <= 0.0
7fd59977 868
869 SetZSize ( me : mutable ; Size : Length )
870 ---Level: Public
871 ---Purpose: Defines the Depth size of the view
872 -- Front Plane will be set to Size/2.
873 -- Back Plane will be set to -Size/2.
874 -- Any Object located Above the Front Plane or
875 -- behind the Back Plane will be Clipped .
876 -- NOTE than the XY Size of the View is NOT modified .
6942f04a 877 raises BadValue from V3d ;
7fd59977 878 -- If the size of the view is <= 0
879
880 SetZoom ( me : mutable ; Coef : Factor ; Start : Boolean = Standard_True )
881 ---Level: Public
882 ---Purpose: Zooms the view by a factor relative to the initial
883 -- value expressed by Start = Standard_True
884 -- Updates the view.
6942f04a 885 raises BadValue from V3d ;
7fd59977 886 -- If the zoom coefficient is <= 0
887
888 SetScale ( me : mutable ; Coef : Factor )
889 ---Level: Public
890 ---Purpose: Zooms the view by a factor relative to the value
891 -- initialised by SetViewMappingDefault().
892 -- Updates the view.
6942f04a 893 raises BadValue from V3d ;
7fd59977 894 -- If the zoom coefficient is <= 0
895
896 SetAxialScale ( me : mutable ; Sx, Sy, Sz : Real from Standard )
897 ---Level: Public
898 ---Purpose: Sets anisotropic (axial) scale factors <Sx>, <Sy>, <Sz> for view <me>.
899 -- Anisotropic scaling operation is performed through multiplying
900 -- the current view orientation matrix by a scaling matrix:
901 -- || Sx 0 0 0 ||
902 -- || 0 Sy 0 0 ||
903 -- || 0 0 Sz 0 ||
904 -- || 0 0 0 1 ||
905 -- Updates the view.
6942f04a 906 raises BadValue from V3d ;
7fd59977 907 -- If the one of factors <= 0
908
197ac94e 909 FitAll (me : mutable;
910 theMargin : Coefficient = 0.01;
911 theToUpdate : Boolean from Standard = Standard_True);
7fd59977 912 ---Level: Public
197ac94e 913 ---Purpose: Adjust view parameters to fit the displayed scene, respecting height / width ratio.
914 -- The Z clipping range (depth range) is fitted if AutoZFit flag is TRUE.
915 -- Throws program error exception if margin coefficient is < 0 or >= 1.
916 -- Updates the view.
917 -- @param theMargin [in] the margin coefficient for view borders.
918 -- @param theToUpdate [in] flag to perform view update.
7fd59977 919
197ac94e 920 ZFitAll (me : mutable; theScaleFactor : Real from Standard = 1.0);
7fd59977 921 ---Level: Public
197ac94e 922 ---Purpose: Change Z-min and Z-max planes of projection volume to match the
923 -- displayed objects. The methods ensures that view volume will
924 -- be close by depth range to the displayed objects. Fitting assumes that
925 -- for orthogonal projection the view volume contains the displayed objects
926 -- completely. For zoomed perspective view, the view volume is adjusted such
927 -- that it contains the objects or their parts, located in front of the camera.
928 -- @param theScaleFactor [in] the scale factor for Z-range.
929 -- The range between Z-min, Z-max projection volume planes
930 -- evaluated by z fitting method will be scaled using this coefficient.
931 -- Program error exception is thrown if negative or zero value is passed.
7fd59977 932
197ac94e 933 AutoZFit (me : mutable);
b5ac8292 934 ---Level: Public
197ac94e 935 ---Purpose: If automatic z-range fitting is turned on, adjusts Z-min and Z-max
936 -- projection volume planes with call to ZFitAll.
b5ac8292 937
7fd59977 938 DepthFitAll( me : mutable ; Aspect : Coefficient = 0.01;
939 Margin : Coefficient = 0.01 );
940 ---Level: Public
941 ---Purpose: Adjusts the viewing volume so as not to clip the displayed objects by front and back
942 -- and back clipping planes. Also sets depth value automatically depending on the
943 -- calculated Z size and Aspect parameter.
944 -- NOTE than the original XY size of the view is NOT modified .
945
197ac94e 946 FitAll (me : mutable;
947 theMinXv : Real from Standard;
948 theMinYv : Real from Standard;
949 theMaxXv : Real from Standard;
950 theMaxYv : Real from Standard)
7fd59977 951 ---Level: Public
197ac94e 952 ---Purpose: Centers the defined projection window so that it occupies
7fd59977 953 -- the maximum space while respecting the initial
954 -- height/width ratio.
955 -- NOTE than the original Z size of the view is NOT modified .
6942f04a 956 raises BadValue from V3d;
7fd59977 957 -- If the defined projection window has zero size.
958
197ac94e 959 WindowFit (me : mutable; theMinXp, theMinYp, theMaxXp, theMaxYp : Integer)
7fd59977 960 ---Level: Public
197ac94e 961 ---Purpose: Centers the defined PIXEL window so that it occupies
962 -- the maximum space while respecting the initial height/width ratio.
963 -- NOTE than the original Z size of the view is NOT modified.
964 -- @param theMinXp [in] pixel coordinates of minimal corner on x screen axis.
965 -- @param theMinYp [in] pixel coordinates of minimal corner on y screen axis.
966 -- @param theMaxXp [in] pixel coordinates of maximal corner on x screen axis.
967 -- @param theMaxYp [in] pixel coordinates of maximal corner on y screen axis.
6942f04a 968 is static;
7fd59977 969 SetViewMappingDefault( me : mutable );
970 ---Level: Public
971 ---Purpose: Saves the current view mapping. This will be the
972 -- state returned from ResetViewmapping.
973
974 ResetViewMapping ( me : mutable );
975 ---Level: Public
197ac94e 976 ---Purpose: Resets the centering of the view.
7fd59977 977 -- Updates the view
978
979 Reset ( me : mutable; update : Boolean from Standard = Standard_True );
980 ---Level: Public
197ac94e 981 ---Purpose: Resets the centering and the orientation of the view
7fd59977 982 -- Updates the view
983 ---------------------------------------------------
984 ---Category: Inquire methods
985 ---------------------------------------------------
986
987 Convert( me ; Vp : Integer ) returns Length
988 ---Level: Public
989 ---Purpose : Converts the PIXEL value
990 -- to a value in the projection plane.
991 raises UnMapped from V3d;
992 -- If the view is not mapped on the window.
993
994 Convert( me ; Xp,Yp : Integer ; Xv,Yv : out Coordinate )
995 ---Level: Public
996 ---Purpose : Converts the point PIXEL into a point projected
997 -- in the reference frame of the projection plane.
998 raises UnMapped from V3d;
999 -- If the view is not mapped on the window.
1000
1001 Convert( me ; Vv : Length ) returns Integer
1002 ---Level: Public
1003 ---Purpose : Converts tha value of the projection plane into
1004 -- a PIXEL value.
1005 raises UnMapped from V3d;
1006 -- If the view is not mapped on the window.
1007
1008 Convert( me ; Xv,Yv : Coordinate ; Xp,Yp : out Integer )
1009 ---Level: Public
1010 ---Purpose : Converts the point defined in the reference frame
1011 -- of the projection plane into a point PIXEL.
1012 raises UnMapped from V3d;
1013 -- If the view is not mapped on the window.
1014
1015 Convert( me ; Xp,Yp : Integer ; X,Y,Z : out Coordinate)
1016 ---Level: Public
1017 ---Purpose : Converts the projected point into a point
1018 -- in the reference frame of the view corresponding
1019 -- to the intersection with the projection plane
1020 -- of the eye/view point vector.
1021 raises UnMapped from V3d;
1022 -- If the view is not mapped on the window.
1023
1024 ConvertWithProj( me ; Xp,Yp : Integer ; X,Y,Z : out Coordinate ; Vx,Vy,Vz : out Parameter)
1025 ---Level: Public
1026 ---Purpose : Converts the projected point into a point
1027 -- in the reference frame of the view corresponding
1028 -- to the intersection with the projection plane
1029 -- of the eye/view point vector and returns the
1030 -- projection ray for further computations.
1031 raises UnMapped from V3d;
1032 -- If the view is not mapped on the window.
1033
1034 ConvertToGrid( me ; Xp,Yp : Integer ; Xg,Yg,Zg : out Coordinate)
1035 ---Level: Public
1036 ---Purpose : Converts the projected point into the nearest grid point
1037 -- in the reference frame of the view corresponding
1038 -- to the intersection with the projection plane
1039 -- of the eye/view point vector and display the grid marker.
679ecdee 1040 -- Warning: When the grid is not active the result is identical to the above Convert() method.
1041 -- How to use:
7fd59977 1042 -- 1) Enable the grid echo display
1043 -- myViewer->SetGridEcho(Standard_True);
679ecdee 1044 -- 2) When application receive a move event:
7fd59977 1045 -- 2.1) Check if any object is detected
1046 -- if( myInteractiveContext->MoveTo(x,y) == AIS_SOD_Nothing ) {
1047 -- 2.2) Check if the grid is active
1048 -- if( myViewer->Grid()->IsActive() ) {
1049 -- 2.3) Display the grid echo and gets the grid point
1050 -- myView->ConvertToGrid(x,y,X,Y,Z);
679ecdee 1051 -- myView->Viewer()->ShowGridEcho (myView, Graphic3d_Vertex (X,Y,Z));
1052 -- myView->RedrawImmediate();
7fd59977 1053 -- 2.4) Else this is the standard case
1054 -- } else myView->Convert(x,y,X,Y,Z);
1055 raises UnMapped from V3d;
1056 -- If the view is not mapped on the window.
1057
1058 ConvertToGrid( me ; X,Y,Z : Coordinate ; Xg,Yg,Zg : out Coordinate)
1059 ---Level: Public
1060 ---Purpose : Converts the point into the nearest grid point
1061 -- and display the grid marker.
1062 ---Warning: When the grid is not active the result is identical
1063 -- to the previous point.
1064 raises UnMapped from V3d;
1065 -- If the view is not mapped on the window.
1066
1067 Convert( me ; X,Y,Z : Coordinate; Xp,Yp : out Integer) ;
1068 ---Level: Public
1069 ---Purpose : Projects the point defined in the reference frame of
1070 -- the view into the projected point in the associated window.
1071
1072-- RefToPix( me ; X,Y,Z : Coordinate; Xp,Yp : out Integer) ;
1073-- ---Purpose : Projects the point defined in the reference frame of
1074-- -- the view into the projected point in the associated window.
1075-- Obsolete : Use Convert(X,Y,Z,Xp,Yp);
1076
1077-- PixToRef( me ; Xp,Yp : Integer; X,Y,Z : out Coordinate) ;
1078-- ---Purpose : Converts the projected point in the associated window of
1079-- -- the view into the point defined in the reference frame.
1080-- Obsolete : Use Convert(Xp,Yp,X,Y,Z);
1081
1082 Project( me ; X,Y,Z : Coordinate; Xp,Yp : out Coordinate) ;
1083 ---Level: Public
1084 ---Purpose : Converts the point defined in the user space of
1085 -- the view to the projected view plane point at z 0.
1086
1087 BackgroundColor( me; Type : TypeOfColor ; V1, V2, V3 : out Parameter) ;
1088 ---Level: Public
1089 ---Purpose: Returns the Background color values of the view
1090 -- depending of the color Type.
1091
1092 BackgroundColor( me ) returns Color from Quantity;
1093 ---Level: Public
1094 ---Purpose: Returns the Background color object of the view.
1095
1096 GradientBackgroundColors( me;
1097 Color1 : out Color from Quantity;
1098 Color2 : out Color from Quantity) ;
1099 ---Level: Public
1100 ---Purpose: Returns the gradient background colour objects of the view.
1101
1102 GradientBackground ( me ) returns GradientBackground from Aspect;
1103 ---Level: Public
1104 ---Purpose: Returns the gradient background of the view.
1105
1106 Scale ( me ) returns Factor ;
1107 ---Level: Public
1108 ---Purpose: Returns the current value of the zoom expressed with
1109 -- respect to SetViewMappingDefault().
1110
1111 AxialScale ( me ; Sx, Sy, Sz : out Real from Standard ) ;
1112 ---Level: Public
1113 ---Purpose: Returns the current values of the anisotropic (axial) scale factors.
1114
7fd59977 1115 Size ( me; Width, Height : out Length );
1116 ---Level: Public
1117 ---Purpose: Returns the height and width of the view.
1118
1119 ZSize ( me ) returns Real ;
1120 ---Level: Public
1121 ---Purpose: Returns the Depth of the view .
1122
1123 Eye( me ; X,Y,Z : out Coordinate );
1124 ---Level: Public
1125 ---Purpose: Returns the position of the eye.
1126
1127 FocalReferencePoint (me ; X,Y,Z : out Coordinate );
1128 ---Level: Public
1129 ---Purpose: Returns the position of point which emanating the
1130 -- projections.
1131
1132 ProjReferenceAxe( me ; Xpix,Ypix : Integer ;
1133 XP,YP,ZP,VX,VY,VZ : out Coordinate );
1134 ---Level: Public
1135 ---Purpose: Returns the coordinate of the point (Xpix,Ypix)
1136 -- in the view (XP,YP,ZP), and the projection vector of the
1137 -- view passing by the point (for PerspectiveView).
1138
1139 Depth( me ) returns Length ;
1140 ---Level: Public
1141 ---Purpose: Returns the Distance between the Eye and View Point.
1142
1143 Proj( me ; Vx,Vy,Vz : out Parameter );
1144 ---Level: Public
1145 ---Purpose: Returns the projection vector.
1146
1147 At( me ; X,Y,Z : out Coordinate );
1148 ---Level: Public
1149 ---Purpose: Returns the position of the view point.
1150
1151 Up( me ; Vx,Vy,Vz : out Parameter );
1152 ---Level: Public
1153 ---Purpose: Returns the vector giving the position of the high point.
1154
1155 Twist( me ) returns PlaneAngle ;
1156 ---Level: Public
1157 ---Purpose: Returns in RADIANS the orientation of the view around
1158 -- the visual axis measured from the Y axis of the screen.
1159
1160 ShadingModel ( me ) returns TypeOfShadingModel ;
1161 ---Level: Public
1162 ---Purpose: Returns the current shading model.
1163
1164 SurfaceDetail(me) returns TypeOfSurfaceDetail;
1165 ---Level: Public
1166 -- purpose: returns the current SurfaceDetail mode
1167
1168 TextureEnv(me) returns TextureEnv from Graphic3d;
1169 ---Level: Public
1170 -- purpose: return the current environment texture used
1171
1172 Transparency(me) returns Boolean from Standard;
1173 ---Level: Public
1174 ---Purpose: Returns the transparency activity.
1175
1176 Visualization ( me ) returns TypeOfVisualization from V3d;
1177 ---Level: Public
1178 ---Purpose: Returns the current visualisation mode.
1179
1180 Antialiasing ( me ) returns Boolean;
1181 ---Level: Public
1182 ---Purpose: Indicates if the antialiasing is active (True) or
1183 -- inactive (False).
1184
1185 ZCueing ( me; Depth, Width : out Length ) returns Boolean ;
1186 ---Level: Public
1187 ---Purpose: Returns activity and information on the Zcueing.
1188 -- <Depth> : Depth of plane.
1189 -- <Width> : Thickness around the plane.
1190
1191 ZClipping ( me; Depth, Width : out Length ) returns TypeOfZclipping;
1192 ---Level: Public
1193 ---Purpose: Returns current information on the ZClipping.
1194 -- <Depth> : Depth of plane.
1195 -- <Width> : Thickness around the plane.
1196 -- <TypeOfZclipping> : "BACK"
1197 -- "FRONT"
1198 -- "SLICE"
1199 -- "OFF"
1200
1201 IfMoreLights( me ) returns Boolean;
1202 ---Level: Advanced
1203 ---Purpose: Returns True if One light more can be
1204 -- activated in this View.
1205
1206 InitActiveLights(me: mutable);
1207 ---Level: Advanced
1208 ---Purpose: initializes an iteration on the active Lights.
1209
1210 MoreActiveLights (me) returns Boolean from Standard;
1211 ---Level: Advanced
1212 ---Purpose: returns true if there are more active Light(s) to return.
1213
1214 NextActiveLights (me: mutable);
1215 ---Level: Advanced
1216 ---Purpose : Go to the next active Light
1217 -- (if there is not, ActiveLight will raise an exception)
1218
1219 ActiveLight(me) returns mutable Light from V3d;
1220 ---Level: Advanced
1221
7fd59977 1222 Viewer ( me ) returns mutable Viewer from V3d;
1223 ---Level: Advanced
1224 ---Purpose: Returns the viewer in which the view has been created.
1225
1226 IfWindow ( me ) returns Boolean;
1227 ---Level: Public
1228 ---Purpose: Returns True if MyView is associated with a window .
1229
1230 Window ( me ) returns mutable Window from Aspect
1231 ---Level: Public
1232 ---Purpose: Returns the Aspect Window associated with the view.
6942f04a 1233 raises BadValue from V3d;
7fd59977 1234 -- If MyView is not associated with a window
1235
1236 Type( me ) returns TypeOfView from V3d;
1237 ---Level: Public
1238 ---Purpose: Returns the Type of the View
1239
197ac94e 1240 Pan (me : mutable;
1241 theDXp : Integer from Standard;
1242 theDYp : Integer from Standard;
1243 theZoomFactor : Factor from Quantity = 1;
1244 theToStart : Boolean = Standard_True);
1245 ---Level: Public
1246 ---Purpose: Translates the center of the view along "x" and "y" axes of
1247 -- view projection. Can be used to perform interactive panning operation.
1248 -- In that case the DXp, DXp parameters specify panning relative to the
1249 -- point where the operation is started.
1250 -- @param theDXp [in] the relative panning on "x" axis of view projection, in pixels.
1251 -- @param theDYp [in] the relative panning on "y" axis of view projection, in pixels.
1252 -- @param theZoomFactor [in] the zooming factor.
1253 -- @param theToStart [in] pass TRUE when starting panning to remember view
1254 -- state prior to panning for relative arguments. Passing 0 for relative
1255 -- panning parameter should return view panning to initial state.
1256 -- Performs update of view.
1257
1258 Zoom (me : mutable;
1259 theXp1 : Integer from Standard;
1260 theYp1 : Integer from Standard;
1261 theXp2 : Integer from Standard;
1262 theYp2 : Integer from Standard)
7fd59977 1263 is static;
1264 ---Level: Public
1265 ---Purpose: Zoom the view according to a zoom factor computed
197ac94e 1266 -- from the distance between the 2 mouse position.
1267 -- @param theXp1 [in] the x coordinate of first mouse position, in pixels.
1268 -- @param theYp1 [in] the y coordinate of first mouse position, in pixels.
1269 -- @param theXp2 [in] the x coordinate of second mouse position, in pixels.
1270 -- @param theYp2 [in] the y coordinate of second mouse position, in pixels.
7fd59977 1271
197ac94e 1272 StartZoomAtPoint (me : mutable;
1273 theXp : Integer from Standard;
1274 theYp : Integer from Standard);
7fd59977 1275 ---Level: Public
197ac94e 1276 ---Purpose: Defines starting point for ZoomAtPoint view operation.
1277 -- @param theXp [in] the x mouse coordinate, in pixels.
1278 -- @param theYp [in] the y mouse coordinate, in pixels.
7fd59977 1279
1280 ZoomAtPoint(me : mutable;
197ac94e 1281 theMouseStartX : Integer from Standard;
1282 theMouseStartY : Integer from Standard;
1283 theMouseEndX : Integer from Standard;
1284 theMouseEndY : Integer from Standard);
7fd59977 1285 ---Level: Public
1286 ---Purpose: Zooms the model at a pixel defined by the method StartZoomAtPoint().
1287
1288 AxialScale ( me: mutable; Dx, Dy: Integer from Standard; Axis: TypeOfAxe from V3d );
1289 ---Level: Public
1290 ---Purpose: Performs anisotropic scaling of <me> view along the given <Axis>.
1291 -- The scale factor is calculated on a basis of
1292 -- the mouse pointer displacement <Dx,Dy>.
1293 -- The calculated scale factor is then passed to SetAxialScale(Sx, Sy, Sz) method.
1294
1295 StartRotation(me : mutable ; X,Y :Integer from Standard;
1296 zRotationThreshold: Ratio from Quantity = 0.0);
1297 ---Level: Public
197ac94e 1298 ---Purpose: Begin the rotation of the view around the screen axis
7fd59977 1299 -- according to the mouse position <X,Y>.
1300 -- Warning: Enable rotation around the Z screen axis when <zRotationThreshold>
1301 -- factor is > 0 soon the distance from the start point and the center
1302 -- of the view is > (medium viewSize * <zRotationThreshold> ).
1303 -- Generally a value of 0.4 is usable to rotate around XY screen axis
197ac94e 1304 -- inside the circular threshold area and to rotate around Z screen axis
7fd59977 1305 -- outside this area.
1306
1307 Rotation(me:mutable; X,Y :Integer from Standard);
1308 ---Level: Public
1309 ---Purpose: Continues the rotation of the view
1310 -- with an angle computed from the last and new mouse position <X,Y>.
1311
1312 FitAll ( me : mutable ; aWindow: Window from Aspect;
1313 Umin, Vmin, Umax, Vmax : Coordinate )
1314 is static private;
1315 ---Level: Public
1316 ---Purpose: Change the scale factor and position of the view
1317 -- such as the bounding box <Umin, Vmin, Umax, Vmax> is contains
1318 -- in the view.
1319
1320
1321 -----------------------------------------
1322 ---Category: Private or Protected methods
1323 -----------------------------------------
1324
1325 SetFocale( me : mutable ; Focale : Length )
1326 ---Purpose: Change View Plane Distance for Perspective Views
1327 raises TypeMismatch from Standard
1328 ---Purpose: Warning! raises TypeMismatch from Standard if the view
1329 -- is not a perspective view.
1330 is static ;
1331
1332 Focale( me ) returns Length;
1333 ---Purpose: Returns the View Plane Distance for Perspective Views
1334
1335 View ( me) returns mutable View from Visual3d is static ;
1336 ---Level: Advanced
1337 ---Purpose: Returns the associated Visual3d view.
1338
b5ac8292 1339 ScreenAxis( myclass ; Vpn,Vup : Dir from gp ;
7fd59977 1340 Xaxe,Yaxe,Zaxe : out Vector from Graphic3d )
1341 returns Boolean is private ;
1342 ---Purpose: Determines the screen axes in the reference
1343 -- framework of the view.
1344
7fd59977 1345
b5ac8292 1346 TrsPoint( myclass ; V : Vertex from Graphic3d ;
7fd59977 1347 Matrix : Array2OfReal from TColStd )
b5ac8292 1348 returns Vertex from Graphic3d is private ;
1349 ---Purpose: Transforms the Vertex V according to the matrice Matrix .
6942f04a 1350
1351 ImmediateUpdate (me) is static protected;
1352 ---Purpose:
7fd59977 1353
7fd59977 1354 SetComputedMode ( me : mutable; aMode : Boolean from Standard )
1355 is static;
1356 ---Level: Advanced
1357 ---Purpose: Switches computed HLR mode in the view
1358 ---Category: Methods to modify the class definition
1359
1360 ComputedMode ( me )
1361 returns Boolean from Standard
1362 is static;
1363 ---Level: Advanced
1364 ---Purpose: Returns the computed HLR mode state
1365 ---Category: Inquire methods
1366
1367 MinMax ( me; Umin,Vmin, Umax,Vmax : out Coordinate ) returns Integer
1368 ---Purpose: Returns the objects number and the projection window
1369 -- of the objects contained in the view.
1370 is static private;
1371
1372 MinMax ( me; Xmin,Ymin,Zmin, Xmax,Ymax,Zmax : out Coordinate )
1373 returns Integer
1374 ---Purpose: Returns the objects number and the box encompassing
1375 -- the objects contained in the view
1376 is static private;
1377
1378 Gravity ( me; X,Y,Z : out Coordinate ) returns Integer
1379 ---Purpose: Returns the Objects number and the gravity center
1380 -- of ALL viewable points in the view
1381 is static private;
1382
1383 Init(me: mutable) is private;
1384
1385 ---Category: for compatibility.
1386
1387 WindowFitAll ( me : mutable ; Xmin, Ymin, Xmax, Ymax : Integer);
1388 ---Purpose: idem than WindowFit
1389
1390 SetPlotter ( me : mutable; aPlotter : Plotter from Graphic3d )
1391 ---Purpose: Set a plotter for plotting the contents of the view
1392 -- field MyPlotter
1393 is virtual;
1394
1395 Plot ( me : mutable )
1396 ---Purpose: Create a 2D View for plotting the contents of the view
6942f04a 1397 raises BadValue from V3d;
7fd59977 1398 -- if the plotter is undefined.
1399
1400 Compute ( me; AVertex : Vertex from Graphic3d )
1401 returns Vertex from Graphic3d
1402 is static private;
1403 ---Level: Internal
1404 ---Purpose: Returns a new vertex when the grid is activated.
1405
1406 SetGrid ( me : mutable;
1407 aPlane: Ax3 from gp;
1408 aGrid : Grid from Aspect )
1409 is static;
1410 ---Level: Internal
1411 ---Purpose: Defines or Updates the definition of the
1412 -- grid in <me>
1413 ---Category: Methods to modify the class definition
1414
1415 SetGridGraphicValues ( me : mutable;
1416 aGrid : Grid from Aspect )
1417 is static;
1418 ---Level: Internal
1419 ---Purpose: Defines or Updates the graphic definition of the
1420 -- grid in <me>
1421 ---Category: Methods to modify the class definition
1422
1423 SetGridActivity ( me : mutable;
1424 aFlag : Boolean from Standard )
1425 is static;
1426 ---Level: Internal
1427 ---Purpose: Defines or Updates the activity of the
1428 -- grid in <me>
1429 ---Category: Methods to modify the class definition
1430
7fd59977 1431 Dump ( me: mutable;
692613e5 1432 theFile : CString from Standard;
1433 theBufferType : BufferType from Graphic3d = Graphic3d_BT_RGB )
7fd59977 1434 returns Boolean from Standard;
1435 ---Level: Public
1436 ---Purpose: dump the full contents of the view at the same
1437 -- scale in the file <theFile>. The file name
1438 -- extension must be one of ".png",".bmp",".jpg",".gif".
1439 -- Returns FALSE when the dump has failed
1440
258ff83b 1441 Print (me; hPrnDC: Handle from Aspect = 0;
7fd59977 1442 showDialog: Boolean = Standard_True;
7edf74fd
A
1443 showBackground : Boolean = Standard_True;
1444 filename: CString = NULL;
1445 printAlgorithm : PrintAlgo from Aspect = Aspect_PA_STRETCH)
1446 returns Boolean from Standard is static;
7fd59977 1447
1448 ---Level: Public
1449 ---Purpose: print the contents of the view to printer with preview.
1450 -- <hPrnDC> : If you have already an PrinterDeviceContext (HDC),
1451 -- then you can pass it to the print routines.
1452 -- If you don't have an PrinterDeviceContext, then this parameter should
1453 -- be NULL.
1454 -- <showDialog> : If hPrnDC == NULL, then you can force the print routines to
1455 -- open a Print Dialog box.
1456 -- If you want to do this, then set showDialog to TRUE
1457 -- If you don't want to see a dialog (only possible, if you have a hPrnDC
1458 -- or the dialog box was opened once before) then set <showDialog> to FALSE.
1459 -- <showBackground> : When set to FALSE then print the view without background color
1460 -- (background is white)
1461 -- else set to TRUE for printing with current background color.
1462 -- <filename>: If != NULL, then the view will be printed to a file.
7edf74fd
A
1463 -- <printAlgorithm>: If you want to select the print algorithm, then you can
1464 -- specify one of existing algorithms: Aspect_PA_STRETCH, Aspect_PA_TILE.
1465 -- Returns Standard_True if the data is passed to the printer, otherwise
1466 -- Standard_False if the print operation failed. This might be related to
1467 -- insufficient memory or some internal errors. All this errors are
1468 -- indicated by the message boxes (on level of OpenGl_GraphicDriver).
1469 -- Warning: This function can reuse FBO assigned to the
1470 -- view on level of OpenGl_GraphicDriver; Please take it into account if
1471 -- you use it for your purposes;
7fd59977 1472 -- Warning: Works only under Windows.
1473
197ac94e 1474 ToPixMap (me : mutable;
1475 theImage : in out PixMap from Image;
1476 theWidth : Integer from Standard;
1477 theHeight : Integer from Standard;
1478 theBufferType : BufferType from Graphic3d = Graphic3d_BT_RGB;
1479 theToKeepAspect : Boolean from Standard = Standard_True;
1480 theStereoOptions : StereoDumpOptions from V3d = V3d_SDO_MONO)
692613e5 1481 returns Boolean from Standard;
7fd59977 1482 ---Level : Public
197ac94e 1483 ---Purpose : Dumps the full contents of the view
1484 -- to a pixmap of pixel size <theWidth> * <theHeight> and
1485 -- buffer type <theBufferType>. If <theToKeepAspect> is true
1486 -- the aspect ratio of view will be kept if <theWidth> and <theHeight>
1487 -- define another ratio.
1488 -- Pixmap will be automatically (re)allocated when needed.
1489 -- When dumping stereographic camera - the corresponding
1490 -- middle-point monographic projection will be used for dumping by default.
1491 -- <theStereoOptions> flags are to be used for dumping then left or
1492 -- right eye projections.
7fd59977 1493
1494 SetProjModel( me : mutable;
1495 amOdel: TypeOfProjectionModel from V3d = V3d_TPM_SCREEN )
1496 is static;
1497 ---Level : Advanced
1498 ---Purpose : Manages projection model
1499
1500 ProjModel( me )
1501 returns TypeOfProjectionModel from V3d
1502 is static;
1503 ---Level : Advanced
1504 ---Purpose : Returns the current projection model
1505
1506 SetBackFacingModel ( me : mutable;
1507 aModel : TypeOfBackfacingModel from V3d = V3d_TOBM_AUTOMATIC)
1508 is static;
1509 ---Level : Public
1510 ---Purpose : Manages display of the back faces
1511 -- When <aModel> is TOBM_AUTOMATIC the object backfaces
1512 -- are displayed only for surface objects and
1513 -- never displayed for solid objects.
1514 -- this was the previous mode.
1515 -- <aModel> is TOBM_ALWAYS_DISPLAYED the object backfaces
1516 -- are always displayed both for surfaces or solids.
1517 -- <aModel> is TOBM_NEVER_DISPLAYED the object backfaces
1518 -- are never displayed.
1519
1520 BackFacingModel ( me )
1521 returns TypeOfBackfacingModel from V3d
1522 is static;
1523 ---Level : Public
1524 ---Purpose : Returns current state of the back faces display
1525
1526 EnableDepthTest( me; enable : Boolean from Standard = Standard_True )
1527 is static;
1528 ---Level: Public
1529 ---Purpose: turns on/off opengl depth testing
1530
1531 IsDepthTestEnabled( me ) returns Boolean from Standard
1532 is static;
1533 ---Level: Public
1534 ---Purpose: returns the current state of the depth testing
1535
1536 EnableGLLight( me; enable : Boolean from Standard = Standard_True )
1537 is static;
1538 ---Level: Public
1539 ---Purpose: turns on/off opengl lighting, currently used in triedron displaying
1540
1541 IsGLLightEnabled( me ) returns Boolean from Standard
1542 is static;
1543 ---Level: Public
1544 ---Purpose: returns the current state of the gl lighting
1545 -- currently used in triedron displaying
1546
4269bd1b 1547 AddClipPlane (me : mutable; thePlane : ClipPlane_Handle from Graphic3d) is virtual;
1548 ---Purpose: Adds clip plane to the view. The composition of clip planes truncates the
1549 -- rendering space to convex volume. Number of supported clip planes can be consulted
1550 -- by PlaneLimit method of associated Visual3d_View. Please be aware that the planes
197ac94e 1551 -- which exceed the limit are ignored during rendering.
4269bd1b 1552 -- @param thePlane [in] the clip plane to be added to view.
1553
1554 RemoveClipPlane (me : mutable; thePlane : ClipPlane_Handle from Graphic3d) is virtual;
1555 ---Purpose: Removes clip plane from the view.
1556 -- @param thePlane [in] the clip plane to be removed from view.
1557
51b10cd4 1558 SetClipPlanes (me : mutable; thePlanes : SequenceOfHClipPlane from Graphic3d);
1559 ---Purpose: Sets sequence of clip planes to the view. The planes that have been set
4269bd1b 1560 -- before are removed from the view. The composition of clip planes
1561 -- truncates the rendering space to convex volume. Number of supported
1562 -- clip planes can be consulted by PlaneLimit method of associated
1563 -- Visual3d_View. Please be aware that the planes which exceed the limit
197ac94e 1564 -- are ignored during rendering.
4269bd1b 1565 -- @param thePlanes [in] the clip planes to set.
1566
51b10cd4 1567 GetClipPlanes (me) returns SequenceOfHClipPlane from Graphic3d;
4269bd1b 1568 ---C++: return const&
1569 ---Purpose: Get clip planes.
1570 -- @return sequence clip planes that have been set for the view
7fd59977 1571
b5ac8292 1572 SetCamera (me : mutable; theCamera : Camera_Handle from Graphic3d) is static;
1573 ---Level: Public
1574 ---Purpose: Change camera used by view.
1575
1576 Camera (me) returns Camera_Handle from Graphic3d is static;
1577 ---Level: Public
197ac94e 1578 ---C++: return const&
b5ac8292 1579 ---Purpose: Returns camera object of the view.
1580 -- @return: handle to camera object, or NULL if 3D view does not use
1581 -- the camera approach.
1582
197ac94e 1583 FitMinMax (me;
1584 theCamera : Camera_Handle from Graphic3d;
1585 theMinCorner : XYZ from gp;
1586 theMaxCorner : XYZ from gp;
1587 theMargin : Real from Standard;
1588 theResolution : Real from Standard = 0.0;
1589 theToEnlargeIfLine : Boolean from Standard = Standard_True)
1590 returns Boolean from Standard is protected;
b5ac8292 1591 ---Level: Protected
197ac94e 1592 ---Purpose: Transform camera eye, center and scale to fit in the
1593 -- passed bounding box specified in WCS.
1594 -- @param theCamera [in] the camera.
1595 -- @param theMinCorner [in] the minimal corner of bounding box.
1596 -- @param theMaxCorner [in] the maximal corner of bounding box.
1597 -- @param theMargin [in] the margin coefficient for view borders.
1598 -- @param theResolution [in] the minimum size of projection of
1599 -- bounding box in Xv or Yv direction when it considered to
1600 -- be a thin plane or point (without a volume).
1601 -- In this case only the center of camera is adjusted.
1602 -- @param theToEnlargeIfLine [in] if passed TRUE - in cases when the
1603 -- whole bounding box projected into thin line going along
1604 -- Z-axis of screen, the view plane is enlarged such that
1605 -- we see the whole line on rotation, otherwise only the
1606 -- center of camera is adjusted.
1607 -- @return TRUE if the fit all operation can be done.
1608
1609 Scale (me;
1610 theCamera : Camera_Handle from Graphic3d;
1611 theSizeXv : Real from Standard;
1612 theSizeYv : Real from Standard) is protected;
b5ac8292 1613 ---Level: Protected
197ac94e 1614 ---Purpose: Scales camera to fit the view frame of defined width and height
1615 -- keeping the aspect. For orthogonal camera the method changes scale,
1616 -- for perspective adjusts Eye location about the Center point.
1617 -- @param theSizeXv [in] size of viewport frame on "x" axis.
1618 -- @param theSizeYv [in] size of viewport frame on "y" axis.
1619
1620 Translate (me;
1621 theCamera : Camera_Handle from Graphic3d;
1622 theDXv : Real from Standard;
1623 theDYv : Real from Standard) is protected;
b5ac8292 1624 ---Level: Protected
197ac94e 1625 -- Purpose: Translates camera eye and center along the view plane.
1626 -- @param theCamera [in] the camera to translate.
1627 -- @param theDXv [in] the translation in "x" direction.
1628 -- @param theDYv [in] the translation in "y" direction.
b5ac8292 1629
e276548b 1630 SetRaytracingMode (me : mutable) is static;
1631 ---Level: Public
1632 ---Purpose: enables OpenCL-based ray-tracing mode
1633
1634 SetRasterizationMode (me : mutable) is static;
1635 ---Level: Public
1636 ---Purpose: enables OpenGL-based rasterization mode
1637
1638 EnableRaytracedShadows (me : mutable) is static;
1639 ---Level: Public
1640 ---Purpose: enables sharp shadows in OpenCL-based ray-tracing mode
1641
1642 EnableRaytracedReflections (me : mutable) is static;
1643 ---Level: Public
1644 ---Purpose: enables specular reflections in OpenCL-based ray-tracing mode
1645
1646 EnableRaytracedAntialiasing (me : mutable) is static;
1647 ---Level: Public
1648 ---Purpose: enables antialiasing in OpenCL-based ray-tracing mode
1649
1650 DisableRaytracedShadows (me : mutable) is static;
1651 ---Level: Public
1652 ---Purpose: disables sharp shadows in OpenCL-based ray-tracing mode
1653
1654 DisableRaytracedReflections (me : mutable) is static;
1655 ---Level: Public
1656 ---Purpose: disables specular reflections in OpenCL-based ray-tracing mode
1657
1658 DisableRaytracedAntialiasing (me : mutable) is static;
1659 ---Level: Public
1660 ---Purpose: disables antialiasing in OpenCL-based ray-tracing mode
1661
7fd59977 1662fields
1663
b5ac8292 1664 myOldMouseX : Real is protected;
1665 myOldMouseY : Real is protected;
1666 myCamStartOpUp : Dir from gp is protected;
1667 myCamStartOpEye : Pnt from gp is protected;
1668 myCamStartOpBnd : Real[6] is protected;
1669 myCamStartOpCenter : Pnt from gp is protected;
1670 myCamera : Camera_Handle from Graphic3d is protected;
1671
7fd59977 1672 MyViewer : ViewerPointer from V3d ;
1673 MyActiveLights: ListOfTransient from V3d;
7fd59977 1674
1675 MyView : View from Visual3d is protected ;
7fd59977 1676 MyViewContext : ContextView from Visual3d ;
1677 MyBackground: Background from Aspect ;
1678 MyGradientBackground: GradientBackground from Aspect ;
1679 MyDefaultViewAxis: Vector from Graphic3d ;
1680 MyDefaultViewPoint: Vertex from Graphic3d ;
1681
1682 MyWindow: Window from Aspect;
1683
1684 MyPlotter: Plotter from Graphic3d;
1685
1686 myActiveLightsIterator: ListIteratorOfListOfTransient from TColStd;
7fd59977 1687
1688 sx,sy: Integer from Standard;
1689 rx,ry: Real from Standard;
1690 gx,gy,gz: Real from Standard;
1691 myComputedMode: Boolean from Standard;
1692 SwitchSetFront: Boolean from Standard;
1693 MyZoomAtPointX, MyZoomAtPointY : Integer from Standard;
1694
1695 -- the 3d grid
1696 MyGrid : Grid from Aspect;
1697 MyPlane : Ax3 from gp;
1698
1699 --MyColorScale : ColorScale from V3d;
1700 MyLayerMgr : LayerMgr from V3d;
1701
eafb234b 1702 MyProjModel : TypeOfProjectionModel from V3d is protected;
1703
7fd59977 1704 -- the transformation between XoY and the grid plane
1705 MyTrsf : Array2OfReal from TColStd;
1706
1707 -- echo
1708 MyGridEchoStructure : Structure from Graphic3d;
1709 MyGridEchoGroup : Group from Graphic3d;
1710
eafb234b 1711 MyTransparencyFlag : Boolean from Standard;
1712 myImmediateUpdate: Boolean from Standard is protected;
b5ac8292 1713
197ac94e 1714 myXscreenAxis : Vector from Graphic3d;
1715 myYscreenAxis : Vector from Graphic3d;
1716 myZscreenAxis : Vector from Graphic3d;
1717 myViewAxis : Vector from Graphic3d;
1718 myGravityReferencePoint : Vertex from Graphic3d;
1719 myCamProjectionShift : Pnt from gp;
1720 myAutoZFitIsOn : Boolean from Standard;
1721 myAutoZFitScaleFactor : Real from Standard;
b5ac8292 1722
7fd59977 1723friends
1724
1725 SetViewOn from class Viewer from V3d ( me : mutable ),
1726 SetViewOn from class Viewer from V3d ( me : mutable ; View : View from V3d ),
1727 SetViewOff from class Viewer from V3d ( me : mutable ),
1728 SetViewOff from class Viewer from V3d ( me : mutable ; View : View from V3d )
1729
1730end View;