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