Commit | Line | Data |
---|---|---|
b311480e | 1 | -- Created on: 1991-09-17 |
2 | -- Created by: NW,JPB,CAL | |
3 | -- Copyright (c) 1991-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 | -- 05-97: CAL; Ajout du Clear sur les TOS_COMPUTED. |
18 | -- 10-97: CAL; Retrait des DataStructure. | |
19 | -- 11-97: CAL; Retrait de la dependance avec math.Calcul developpe. | |
20 | -- 11-97: CAL; Ajout de NumberOfDisplayedStructures | |
21 | -- 05-98: CAL; Perfs. Connection entre structures COMPUTED. | |
22 | -- 16-09-98: BGN; Points d'entree du Triedre (S3819, Phase 1) | |
23 | -- 22-09-98: BGN; S3989 (anciennement S3819) | |
24 | -- TypeOfTriedron* from Aspect(et pas Visual3d) | |
25 | -- 02-12-98: S4062. Ajout des layers. | |
26 | -- 13-09-99: GG; GER61454 Adds LightLimit() and PlaneLimit() methods | |
27 | -- 10-11-99: GG; Add PRO19603 Redraw( area ) method | |
28 | -- 14-01-00: GG; Add IMP140100 ViewManager() method | |
7fd59977 | 29 | -- THA - 17/08/00 Thomas HARTL <t-hartl@muenchen.matra-dtv.fr> |
30 | -- -> Add Print methods (works only under Windows).- | |
31 | -- GG - RIC120302 Add NEW SetWindow method. | |
7fd59977 | 32 | -- 30-04-02: JMB; MyDisplayedStructure is now a Map instead |
33 | -- of a Set. Improves performance of Selection | |
34 | -- mechanisms | |
7fd59977 | 35 | |
36 | -- SAV - 22/10/01 -> Add EnableDepthTest() & IsDepthTestEnabled() methods. | |
37 | -- SAV - 25/10/01 -> Add EnableGLLight() & IsGLLightEnabled() methods. | |
38 | -- VSV - 28/05/02: ZBUFFER mode of Trihedron | |
39 | -- SAV - 23/12/02 Added methods too set background image | |
7fd59977 | 40 | |
41 | class View from Visual3d inherits DataStructureManager from Graphic3d | |
42 | ||
43 | ---Version: | |
44 | ||
45 | ---Purpose: Creation and edition of a view in a 3D visualiser. | |
46 | -- A 3D view is composed of an "orientation" part defined | |
47 | -- by the position of the observer, the direction of view, | |
48 | -- and a "mapping" part defined by the type of projection | |
49 | -- (parallel or perspective) and by the window-viewport | |
50 | -- couple which allows passage from the projected coordinate | |
51 | -- space into the screen space. | |
52 | -- Summary of 3D Viewing | |
53 | -- To define a view, you must define: | |
54 | -- - The view orientation transformation | |
55 | -- - The view mapping transformation | |
56 | -- - The view representation. | |
57 | -- To activate a view, you must define: | |
58 | -- - The associated window. | |
59 | ||
60 | ||
61 | uses | |
62 | ||
63 | Array2OfReal from TColStd, | |
64 | ||
65 | Background from Aspect, | |
66 | GradientBackground from Aspect, | |
7fd59977 | 67 | Window from Aspect, |
68 | TypeOfUpdate from Aspect, | |
69 | TypeOfHighlightMethod from Aspect, | |
70 | TypeOfTriedronEcho from Aspect, | |
71 | TypeOfTriedronPosition from Aspect, | |
72 | Handle from Aspect, | |
73 | RenderingContext from Aspect, | |
74 | GraphicCallbackProc from Aspect, | |
75 | ColorScale from Aspect, | |
7edf74fd | 76 | PrintAlgo from Aspect, |
7fd59977 | 77 | |
692613e5 | 78 | BufferType from Graphic3d, |
7fd59977 | 79 | CBitFields8 from Graphic3d, |
80 | CView from Graphic3d, | |
81 | GraphicDriver from Graphic3d, | |
82 | PtrFrameBuffer from Graphic3d, | |
7fd59977 | 83 | Structure from Graphic3d, |
84 | SequenceOfStructure from Graphic3d, | |
85 | MapOfStructure from Graphic3d, | |
b5ac8292 | 86 | Camera_Handle from Graphic3d, |
7fd59977 | 87 | |
a1954302 | 88 | ZLayerId from Graphic3d, |
c5751993 | 89 | ZLayerSettings from Graphic3d, |
90 | ||
7fd59977 | 91 | ContextView from Visual3d, |
7fd59977 | 92 | Layer from Visual3d, |
93 | Light from Visual3d, | |
54f7544d | 94 | SequenceOfLight from Visual3d, |
7fd59977 | 95 | TypeOfAnswer from Visual3d, |
7fd59977 | 96 | ViewManager from Visual3d, |
97 | ViewManagerPtr from Visual3d, | |
98 | ||
99 | TypeOfBackfacingModel from Visual3d, | |
100 | ||
101 | NameOfColor from Quantity, | |
102 | FillMethod from Aspect, | |
103 | GradientFillMethod from Aspect, | |
104 | ExportFormat from Graphic3d, | |
105 | SortType from Graphic3d, | |
106 | Color from Quantity, | |
eeaaaefb | 107 | FontAspect from Font, |
13a22457 S |
108 | AsciiString from TCollection, |
109 | ExtendedString from TCollection, | |
692613e5 | 110 | CGraduatedTrihedron from Graphic3d, |
a1954302 | 111 | TypeOfStructure from Graphic3d, |
692613e5 | 112 | |
ed063270 | 113 | PixMap from Image, |
114 | Box from Bnd | |
7fd59977 | 115 | |
116 | raises | |
117 | TransformError from Visual3d, | |
118 | ViewDefinitionError from Visual3d | |
119 | ||
120 | is | |
121 | ||
122 | ---------------------------------------------- | |
123 | -- Summary of 3D Viewing -- | |
124 | -- -- | |
125 | -- To define a view, you must define -- | |
126 | -- -- | |
127 | -- The view orientation transformation -- | |
128 | -- The view mapping transformation -- | |
129 | -- The view representation. -- | |
130 | -- -- | |
131 | -- To activate a view, you must define -- | |
132 | -- -- | |
133 | -- The associated window. -- | |
134 | ---------------------------------------------- | |
135 | ||
6e33d3ce | 136 | Create ( AManager : ViewManager from Visual3d ) |
137 | returns View from Visual3d; | |
7fd59977 | 138 | ---Level: Public |
139 | ---Purpose: Creates a view in the viewer <AManager> with a default | |
140 | -- orientation and a default mapping. | |
141 | ||
7fd59977 | 142 | --------------------------------------------------- |
143 | -- Category: Methods to modify the class definition | |
144 | --------------------------------------------------- | |
145 | ||
146 | Activate ( me : mutable ) | |
147 | ---Level: Public | |
148 | ---Purpose: Activates the view <me>. | |
149 | -- Map the associated window on the screen and | |
150 | -- post the view in this window. | |
151 | -- Category: Methods to modify the class definition | |
152 | -- Warning: Raises ViewDefinitionError if the associated | |
153 | -- window isn't defined. | |
154 | raises ViewDefinitionError from Visual3d is static; | |
155 | ||
156 | Deactivate ( me : mutable ) | |
157 | ---Level: Public | |
158 | ---Purpose: Deactivates the view <me>. | |
159 | -- Unmap the associated window on the screen and | |
160 | -- unpost the view in this window. | |
161 | -- Category: Methods to modify the class definition | |
162 | -- Warning: Raises ViewDefinitionError if the associated | |
163 | -- window isn't defined. | |
164 | raises ViewDefinitionError from Visual3d is static; | |
165 | ||
166 | Destroy ( me : mutable ) | |
167 | is redefined; | |
168 | ---Level: Public | |
169 | ---Purpose: Deletes and erases the view <me>. | |
170 | ---Category: Methods to modify the class definition | |
171 | ---C++: alias ~ | |
172 | ||
173 | Redraw ( me : mutable ) | |
174 | is static; | |
175 | ---Level: Public | |
176 | ---Purpose: Updates screen in all cases. | |
177 | ---Category: Methods to modify the class definition | |
178 | ||
679ecdee | 179 | RedrawImmediate ( me : mutable ) |
180 | is static; | |
181 | ---Level: Public | |
182 | ---Purpose: Updates layer of immediate presentations. | |
183 | ||
7fd59977 | 184 | Redraw ( me : mutable; x,y,width,height: Integer from Standard ) |
185 | is static; | |
186 | ---Level: Public | |
187 | ---Purpose: Updates screen area in all cases. | |
188 | -- area is given by his xy min corner and size in pixel coordinates | |
189 | ---Category: Methods to modify the class definition | |
190 | ||
191 | Redraw ( me : mutable; | |
192 | AnUnderLayer : Layer from Visual3d; | |
193 | AnOverLayer : Layer from Visual3d ) | |
194 | is static; | |
195 | ---Level: Internal | |
196 | ---Purpose: Updates screen in all cases. | |
197 | ---Category: Methods to modify the class definition | |
198 | ||
679ecdee | 199 | RedrawImmediate ( me : mutable; |
200 | theUnderLayer : Layer from Visual3d; | |
201 | theOverLayer : Layer from Visual3d ) | |
202 | is static; | |
203 | ---Level: Public | |
204 | ---Purpose: Updates layer of immediate presentations. | |
205 | ||
206 | Invalidate ( me : mutable ) | |
207 | is static; | |
208 | ---Level: Public | |
209 | ---Purpose: Invalidates view content but does not redraw it. | |
210 | ||
7fd59977 | 211 | Redraw ( me : mutable; |
212 | AnUnderLayer : Layer from Visual3d; | |
213 | AnOverLayer : Layer from Visual3d; | |
214 | x,y,width,height: Integer from Standard ) | |
215 | is static; | |
216 | ---Level: Internal | |
217 | ---Purpose: Updates screen area in all cases. | |
218 | -- area is given by his xy min corner and size in pixel coordinates | |
219 | ---Category: Methods to modify the class definition | |
220 | ||
221 | Remove ( me : mutable ) | |
222 | is static; | |
223 | ---Level: Public | |
224 | ---Purpose: Deletes and erases the view <me>. | |
225 | -- Warning: No more graphic operations in <me> after this call. | |
226 | ---Category: Methods to modify the class definition | |
227 | ||
228 | Resized ( me : mutable ) | |
229 | ---Level: Public | |
230 | ---Purpose: Updates the view <me> after the modification | |
231 | -- of the associated window. | |
232 | -- Category: Methods to modify the class definition | |
233 | -- Warning: Raises ViewDefinitionError if the associated | |
234 | -- window isn't defined. | |
235 | raises ViewDefinitionError from Visual3d is static; | |
236 | ||
237 | SetBackground ( me : mutable; | |
238 | ABack : Background from Aspect ) | |
239 | ---Level: Internal | |
240 | ---Purpose: Modifies the default window background. | |
241 | -- Category: Methods to modify the class definition | |
242 | -- Warning: Raises ViewDefinitionError if the associated | |
243 | -- window isn't defined. | |
244 | raises ViewDefinitionError from Visual3d is static; | |
245 | ||
246 | SetBackgroundImage( me : mutable; FileName : CString from Standard; | |
247 | FillStyle : FillMethod from Aspect; | |
248 | update : Boolean from Standard ) | |
249 | ---Level: Internal | |
250 | ---Purpose: | |
251 | -- Category: Methods to modify the class definition | |
252 | -- Warning: Raises ViewDefinitionError if the associated | |
253 | -- window isn't defined. | |
254 | raises ViewDefinitionError from Visual3d is static; | |
255 | ||
256 | SetBgImageStyle( me : mutable; FillStyle : FillMethod from Aspect; | |
257 | update : Boolean from Standard ) | |
258 | ---Level: Internal | |
259 | ---Purpose: | |
260 | -- Category: Methods to modify the class definition | |
261 | -- Warning: Raises ViewDefinitionError if the associated | |
262 | -- window isn't defined. | |
263 | raises ViewDefinitionError from Visual3d is static; | |
264 | ||
265 | SetGradientBackground ( me : mutable; | |
266 | ABack : GradientBackground from Aspect; | |
267 | update : Boolean from Standard ) | |
268 | ---Level: Internal | |
269 | ---Purpose: Modifies the gradient window background. | |
270 | -- Category: Methods to modify the class definition | |
271 | -- Warning: Raises ViewDefinitionError if the associated | |
272 | -- window isn't defined. | |
273 | raises ViewDefinitionError from Visual3d is static; | |
274 | ||
275 | SetBgGradientStyle( me : mutable; | |
276 | FillStyle : GradientFillMethod from Aspect; | |
277 | update : Boolean from Standard ) | |
278 | ---Level: Internal | |
279 | ---Purpose: | |
280 | -- Category: Methods to modify the class definition | |
281 | -- Warning: Raises ViewDefinitionError if the associated | |
282 | -- window isn't defined. | |
283 | raises ViewDefinitionError from Visual3d is static; | |
284 | ||
285 | SetBackFacingModel ( me : mutable; | |
286 | aModel : TypeOfBackfacingModel from Visual3d | |
287 | ) is static; | |
288 | ---Level : Public | |
289 | ---Purpose : Manages display of the back faces | |
290 | ||
291 | BackFacingModel ( me ) | |
292 | returns TypeOfBackfacingModel from Visual3d is static; | |
293 | ---Level : Public | |
294 | ---Purpose : Returns current state of the back faces display | |
295 | ||
296 | SetContext ( me : mutable; | |
297 | CTX : ContextView from Visual3d ) | |
298 | is static; | |
299 | ---Level: Public | |
300 | ---Purpose: Sets the context <CTX> in the view <me>. | |
301 | ---Category: Methods to modify the class definition | |
302 | ||
7fd59977 | 303 | SetViewMappingDefault ( me : mutable ) |
304 | is static; | |
305 | ---Level: Public | |
306 | ---Purpose: Saves the current mapping which will be the | |
307 | -- reference value for the reset of the mapping | |
308 | -- done by the ViewmappingReset method. | |
309 | ---Category: Methods to modify the class definition | |
310 | ||
7fd59977 | 311 | SetViewOrientationDefault ( me : mutable ) |
312 | is static; | |
313 | ---Level: Public | |
314 | ---Purpose: Saves the current orientation which will be the | |
315 | -- reference value for the reset of the orientation | |
316 | -- done by the ViewOrientationReset method. | |
317 | ---Category: Methods to modify the class definition | |
318 | ||
319 | SetWindow ( me : mutable; | |
320 | AWindow : Window from Aspect ) | |
321 | ---Level: Public | |
322 | ---Purpose: Associates the window <AWindow> to the view <me>. | |
323 | -- No new association if the window is already defined. | |
324 | -- Category: Methods to modify the class definition | |
325 | -- Warning: Raises ViewDefinitionError if it is impossible | |
326 | -- to associate a view and a window. | |
327 | -- (association already done or another problem) | |
328 | -- Modifies the viewmapping of the associated view | |
329 | -- when it calls the SetRatio method. | |
330 | raises ViewDefinitionError from Visual3d is static; | |
331 | ---Purpose: | |
332 | -- After this call, each view is mapped in an unique window. | |
333 | -- | |
334 | -- Programming example : | |
335 | -- | |
336 | -- An example when we have 1 view and 1 window | |
337 | -- ------------------------------------------- | |
338 | -- | |
dc3fe572 | 339 | -- Handle(Aspect_DisplayConnection) aDisplayConnection; |
340 | -- | |
341 | -- // Display connection initialization only needed on Linux platform | |
342 | -- // and on Mac OS X, in cases when you use Xlib for windows drawing. | |
343 | -- aDisplayConnection = new Aspect_DisplayConnection(); | |
344 | -- | |
345 | -- // Graphic driver initialization | |
346 | -- Handle(Graphic3d_GraphicDriver) aGraphicDriver = | |
347 | -- Graphic3d::InitGraphicDriver (aDisplayConnection); | |
7fd59977 | 348 | -- |
349 | -- // Define a view manager | |
dc3fe572 | 350 | -- Handle(Visual3d_ViewManager) aVisualManager = new Visual3d_ViewManager (aGraphicDriver); |
7fd59977 | 351 | -- |
352 | -- // Define a view | |
dc3fe572 | 353 | -- Handle(Visual3d_View) aView = new Visual3d_View (aVisaulManager); |
7fd59977 | 354 | -- |
355 | -- // Define a window | |
dc3fe572 | 356 | -- Handle(Xw_Window) aWindow = new Xw_Window |
357 | -- (aDisplayConnection, "Graphic View 1", 0.695, 0.695, 0.600, 0.600, Quantity_NOC_MATRAGRAY); | |
7fd59977 | 358 | -- |
359 | -- // Associate the view and the window | |
dc3fe572 | 360 | -- aView->SetWindow (aWindow); |
7fd59977 | 361 | -- |
362 | -- // Map the window | |
dc3fe572 | 363 | -- aWindow->Map (); |
7fd59977 | 364 | -- |
365 | -- // Activate the view | |
dc3fe572 | 366 | -- aView->Activate (); |
7fd59977 | 367 | -- |
368 | ||
369 | SetWindow ( me : mutable; | |
370 | AWindow : Window from Aspect; | |
371 | AContext: RenderingContext from Aspect; | |
372 | ADisplayCB: GraphicCallbackProc from Aspect; | |
373 | AClientData: Address from Standard | |
374 | ) | |
375 | ---Level: Public | |
376 | ---Purpose: Associates the window <AWindow> and context <AContext> | |
377 | -- to the view <me>. | |
378 | -- If <AContext> is not NULL the graphic context is used | |
379 | -- directly to draw something in this view. | |
380 | -- Otherwise an internal context is created. | |
381 | -- If <ADisplayCB> is not NULL then a user display CB is | |
382 | -- call at the end of the OCC graphic traversal and just | |
383 | -- before the swap of buffers. The <aClientData> is pass | |
384 | -- to this call back. | |
385 | -- No new association if the window is already defined. | |
386 | -- Category: Methods to modify the class definition | |
387 | -- Warning: Raises ViewDefinitionError if it is impossible | |
388 | -- to associate a view and a window. | |
389 | -- (association already done or another problem) | |
390 | -- Modifies the viewmapping of the associated view | |
391 | -- when it calls the SetRatio method. | |
392 | raises ViewDefinitionError from Visual3d is static; | |
393 | ---Purpose: | |
394 | -- After this call, each view is mapped in an unique window. | |
7fd59977 | 395 | |
6bc6a6fc | 396 | Update ( me : mutable; |
397 | theUpdateMode : TypeOfUpdate from Aspect ) | |
7fd59977 | 398 | is static; |
399 | ---Level: Public | |
400 | ---Purpose: Updates screen in function of modifications of | |
401 | -- the structures. | |
402 | ---Category: Methods to modify the class definition | |
403 | ||
404 | Update ( me : mutable; | |
405 | AnUnderLayer : Layer from Visual3d; | |
406 | AnOverLayer : Layer from Visual3d ) | |
407 | is static; | |
408 | ---Level: Internal | |
409 | ---Purpose: Updates screen in function of modifications of | |
410 | -- the structures. | |
411 | ---Category: Methods to modify the class definition | |
412 | ||
6bc6a6fc | 413 | SetAutoZFitMode (me : mutable; |
414 | theIsOn : Boolean; | |
415 | theScaleFactor : Real from Standard = 1.0); | |
416 | ---Level: public | |
417 | ---Purpose: Sets the automatic z-fit mode and its parameters. | |
418 | -- The auto z-fit has extra parameters which can controlled from application level | |
419 | -- to ensure that the size of viewing volume will be sufficiently large to cover | |
420 | -- the depth of unmanaged objects, for example, transformation persistent ones. | |
421 | -- @param theScaleFactor [in] the scale factor for Z-range. | |
422 | -- The range between Z-min, Z-max projection volume planes | |
423 | -- evaluated by z fitting method will be scaled using this coefficient. | |
424 | -- Program error exception is thrown if negative or zero value | |
425 | -- is passed. | |
426 | ||
427 | AutoZFitMode (me) returns Boolean; | |
428 | ---Level: public | |
429 | ---Purpose: returns TRUE if automatic z-fit mode is turned on. | |
430 | ||
431 | AutoZFitScaleFactor (me) returns Real from Standard; | |
432 | ---Level: public | |
433 | ---Purpose: returns scale factor parameter of automatic z-fit mode. | |
434 | ||
435 | AutoZFit (me : mutable); | |
436 | ---Level: Public | |
437 | ---Purpose: If automatic z-range fitting is turned on, adjusts Z-min and Z-max | |
438 | -- projection volume planes with call to ZFitAll. | |
439 | ||
440 | ZFitAll (me : mutable; theScaleFactor : Real from Standard = 1.0); | |
441 | ---Level: Public | |
442 | ---Purpose: Change Z-min and Z-max planes of projection volume to match the | |
443 | -- displayed objects. | |
444 | ||
7fd59977 | 445 | ViewMappingReset ( me : mutable ) |
446 | is static; | |
447 | ---Level: Public | |
448 | ---Purpose: Sets the value of the mapping to be the same as | |
449 | -- the mapping saved by the SetViewMappingDefaut method. | |
450 | ---Category: Methods to modify the class definition | |
451 | ||
452 | ViewOrientationReset ( me : mutable ) | |
453 | is static; | |
454 | ---Level: Public | |
455 | ---Purpose: Sets the value of the orientation to be the same as the | |
456 | -- orientation saved by the SetViewOrientationDefaut method. | |
457 | ---Category: Methods to modify the class definition | |
458 | ||
7fd59977 | 459 | SetComputedMode ( me : mutable; aMode : Boolean from Standard ) is static; |
460 | ---Level: Advanced | |
461 | ---Purpose: Switches computed HLR mode in the view | |
462 | ---Category: Methods to modify the class definition | |
463 | ||
464 | ComputedMode ( me ) returns Boolean from Standard is static; | |
465 | ---Level: Advanced | |
466 | ---Purpose: Returns the computed HLR mode state | |
467 | ---Category: Inquire methods | |
468 | ||
469 | --------------------------------------------------- | |
470 | -- Category: Methods to modify the class definition | |
471 | -- Triedron methods | |
472 | --------------------------------------------------- | |
473 | ||
474 | ZBufferTriedronSetup ( me : mutable; | |
475 | XColor : NameOfColor from Quantity = Quantity_NOC_RED; | |
476 | YColor : NameOfColor from Quantity = Quantity_NOC_GREEN; | |
477 | ZColor : NameOfColor from Quantity = Quantity_NOC_BLUE1; | |
478 | SizeRatio : Real from Standard = 0.8; | |
479 | AxisDiametr : Real from Standard = 0.05; | |
480 | NbFacettes : Integer from Standard = 12) | |
481 | is static; | |
482 | ---Level: Advanced | |
483 | ---Purpose: Customization of the ZBUFFER Triedron. | |
484 | --- Initializes Colors of X Y and axis | |
485 | --- Scale ratio defines decreasing of trihedron size when | |
486 | --- its position is out of a View | |
487 | ||
488 | TriedronDisplay ( me : mutable; | |
489 | APosition : TypeOfTriedronPosition from Aspect = Aspect_TOTP_CENTER; | |
490 | AColor : NameOfColor from Quantity = Quantity_NOC_WHITE ; | |
491 | AScale : Real from Standard = 0.02; | |
492 | AsWireframe : Boolean from Standard = Standard_True ) | |
493 | is static; | |
494 | ---Level: Public | |
495 | ---Purpose: Display of the Triedron. | |
496 | --- Initialize position, color and length of Triedron axes. | |
497 | --- The scale is a percent of the window width. | |
498 | --- If AsWireframe is FALSE triedron is shown in shaded mode | |
499 | --- AColor is not considered for ZBUFFER mode | |
500 | ---Category: | |
501 | ||
502 | TriedronErase ( me : mutable ) | |
503 | is static; | |
504 | ---Level: Public | |
505 | ---Purpose: Erases the Triedron. | |
506 | ---Category: | |
507 | ||
508 | TriedronEcho ( me : mutable; | |
509 | AType : TypeOfTriedronEcho from Aspect = Aspect_TOTE_NONE ) | |
510 | is static; | |
511 | ---Level: Public | |
512 | ---Purpose: Highlights the echo zone of the Triedron. | |
513 | ---Category: | |
514 | ||
515 | ------------------------------------------ | |
516 | ---Category: Graduated trihedron | |
517 | ------------------------------------------ | |
518 | ||
519 | GetGraduatedTrihedron(me; | |
520 | -- Names of axes -- | |
13a22457 | 521 | xname, yname, zname : out ExtendedString from TCollection; |
7fd59977 | 522 | -- Draw names -- |
13a22457 | 523 | xdrawname, ydrawname, zdrawname : out Boolean from Standard; |
7fd59977 | 524 | -- Draw values -- |
13a22457 | 525 | xdrawvalues, ydrawvalues, zdrawvalues : out Boolean from Standard; |
7fd59977 | 526 | -- Draw grid -- |
527 | drawgrid : out Boolean from Standard; | |
528 | -- Draw axes -- | |
529 | drawaxes : out Boolean from Standard; | |
530 | -- Number of splits along axes -- | |
13a22457 | 531 | nbx, nby, nbz : out Integer from Standard; |
7fd59977 | 532 | -- Offset for drawing values -- |
13a22457 | 533 | xoffset, yoffset, zoffset : out Integer from Standard; |
7fd59977 | 534 | -- Offset for drawing names of axes -- |
13a22457 | 535 | xaxisoffset, yaxisoffset, zaxisoffset : out Integer from Standard; |
7fd59977 | 536 | -- Draw tickmarks -- |
13a22457 | 537 | xdrawtickmarks, ydrawtickmarks, zdrawtickmarks : out Boolean from Standard; |
7fd59977 | 538 | -- Length of tickmarks -- |
13a22457 | 539 | xtickmarklength, ytickmarklength, ztickmarklength : out Integer from Standard; |
7fd59977 | 540 | -- Grid color -- |
541 | gridcolor : out Color from Quantity; | |
13a22457 S |
542 | -- Colors of axis names -- |
543 | xnamecolor, ynamecolor, znamecolor : out Color from Quantity; | |
544 | -- Colors of axis and values -- | |
545 | xcolor, ycolor, zcolor : out Color from Quantity; | |
7fd59977 | 546 | -- Name of font for names of axes -- |
13a22457 | 547 | fontOfNames : out AsciiString from TCollection; |
7fd59977 | 548 | -- Style of names of axes -- |
eeaaaefb | 549 | styleOfNames : out FontAspect from Font; |
7fd59977 | 550 | -- Size of names of axes -- |
551 | sizeOfNames : out Integer from Standard; | |
552 | -- Name of font for values -- | |
13a22457 | 553 | fontOfValues : out AsciiString from TCollection; |
7fd59977 | 554 | -- Style of values -- |
eeaaaefb | 555 | styleOfValues : out FontAspect from Font; |
7fd59977 | 556 | -- Size of values -- |
557 | sizeOfValues : out Integer from Standard) | |
13a22457 | 558 | returns Boolean from Standard |
7fd59977 | 559 | is static; |
13a22457 | 560 | ---Purpose: Returns data of a graduated trihedron if displayed (return value is True) |
7fd59977 | 561 | |
562 | GraduatedTrihedronDisplay(me : mutable; | |
563 | -- Names of axes -- | |
13a22457 | 564 | xname, yname, zname : ExtendedString from TCollection; |
7fd59977 | 565 | -- Draw names -- |
13a22457 | 566 | xdrawname, ydrawname, zdrawname : Boolean from Standard; |
7fd59977 | 567 | -- Draw values -- |
13a22457 | 568 | xdrawvalues, ydrawvalues, zdrawvalues : Boolean from Standard; |
7fd59977 | 569 | -- Draw grid -- |
570 | drawgrid : Boolean from Standard; | |
571 | -- Draw axes -- | |
572 | drawaxes : Boolean from Standard; | |
573 | -- Number of splits along axes -- | |
13a22457 | 574 | nbx, nby, nbz : Integer from Standard; |
7fd59977 | 575 | -- Offset for drawing values -- |
13a22457 | 576 | xoffset, yoffset, zoffset : Integer from Standard; |
7fd59977 | 577 | -- Offset for drawing names of axes -- |
13a22457 | 578 | xaxisoffset, yaxisoffset, zaxisoffset : Integer from Standard; |
7fd59977 | 579 | -- Draw tickmarks -- |
13a22457 | 580 | xdrawtickmarks, ydrawtickmarks, zdrawtickmarks : Boolean from Standard; |
7fd59977 | 581 | -- Length of tickmarks -- |
13a22457 | 582 | xtickmarklength, ytickmarklength, ztickmarklength : Integer from Standard; |
7fd59977 | 583 | -- Grid color -- |
584 | gridcolor : Color from Quantity; | |
13a22457 S |
585 | -- Colors of axis names -- |
586 | xnamecolor, ynamecolor, znamecolor : Color from Quantity; | |
587 | -- Colors of axis and values -- | |
588 | xcolor, ycolor, zcolor : Color from Quantity; | |
7fd59977 | 589 | -- Name of font for names of axes -- |
13a22457 | 590 | fontOfNames : AsciiString from TCollection; |
7fd59977 | 591 | -- Style of names of axes -- |
eeaaaefb | 592 | styleOfNames : FontAspect from Font; |
7fd59977 | 593 | -- Size of names of axes -- |
594 | sizeOfNames : Integer from Standard; | |
595 | -- Name of font for values -- | |
13a22457 | 596 | fontOfValues : AsciiString from TCollection; |
7fd59977 | 597 | -- Style of values -- |
eeaaaefb | 598 | styleOfValues : FontAspect from Font; |
7fd59977 | 599 | -- Size of values -- |
600 | sizeOfValues : Integer from Standard) | |
601 | ---Purpose: Displays a graduated trihedron. | |
602 | is static; | |
603 | ||
604 | GraduatedTrihedronErase(me : mutable) | |
605 | ---Purpose: Erases a graduated trihedron from the view. | |
606 | is static; | |
607 | ||
608 | ---------------------------- | |
609 | ---Category: Inquire methods | |
610 | ---------------------------- | |
611 | ||
612 | Background ( me ) | |
613 | returns Background from Aspect | |
614 | is static; | |
615 | ---Level: Internal | |
616 | ---Purpose: Returns the value of the default window background. | |
617 | ||
618 | GradientBackground ( me ) | |
619 | returns GradientBackground from Aspect | |
620 | is static; | |
621 | ---Level: Internal | |
622 | ---Purpose: Returns the value of the window background. | |
623 | ||
624 | ContainsFacet ( me ) | |
625 | returns Boolean from Standard | |
626 | is static; | |
627 | ---Level: Public | |
628 | ---Purpose: Returns Standard_True if one of the structures | |
629 | -- displayed in the view <me> contains Polygons, | |
630 | -- Triangles or Quadrangles. | |
631 | ||
632 | ContainsFacet ( me; | |
633 | ASet : MapOfStructure from Graphic3d ) | |
634 | returns Boolean from Standard | |
635 | is static; | |
636 | ---Level: Public | |
637 | ---Purpose: Returns Standard_True if one of the structures | |
638 | -- in the set <ASet> contains Polygons, Triangles | |
639 | -- or Quadrangles. | |
640 | ||
641 | Context ( me ) | |
642 | returns ContextView from Visual3d | |
643 | is static; | |
644 | ---Level: Public | |
645 | ---Purpose: Returns the current context of the view <me>. | |
646 | ---C++: return const & | |
647 | ||
648 | DisplayedStructures ( me; SG: in out MapOfStructure from Graphic3d ) | |
649 | is static; | |
650 | ---Level: Internal | |
651 | ---Purpose: Returns the set of structures displayed in | |
652 | -- the view <me>. | |
653 | ||
654 | IsActive ( me ) | |
655 | returns Boolean from Standard | |
656 | is static; | |
657 | ---Level: Public | |
658 | ---Purpose: Returns the activity flag of the view <me>. | |
659 | ||
660 | IsDefined ( me ) | |
661 | returns Boolean from Standard | |
662 | is static; | |
663 | ---Level: Public | |
664 | ---Purpose: Returns True if the window associated to the view | |
665 | -- <me> is defined. | |
666 | ||
667 | IsDeleted ( me ) | |
668 | returns Boolean from Standard | |
669 | is static; | |
670 | ---Level: Public | |
671 | ---Purpose: Returns Standard_True is the view <me> is deleted. | |
672 | -- <me> is deleted after the call Remove (me). | |
673 | ---Category: Inquire methods | |
674 | ||
197ac94e | 675 | MinMaxValues (me; |
197ac94e | 676 | theToIgnoreInfiniteFlag : Boolean from Standard = Standard_False) |
ed063270 | 677 | returns Box from Bnd |
197ac94e | 678 | is static; |
679 | ---Level: Public | |
680 | ---Purpose: Returns the coordinates of the boundary box of all | |
681 | -- structures displayed in the view <me>. | |
682 | -- If <theToIgnoreInfiniteFlag> is TRUE, then the boundary box | |
683 | -- also includes minimum and maximum limits of graphical elements | |
684 | -- forming parts of infinite structures. | |
685 | ||
686 | MinMaxValues (me; | |
687 | theSet : MapOfStructure from Graphic3d; | |
197ac94e | 688 | theToIgnoreInfiniteFlag : Boolean from Standard = Standard_False) |
ed063270 | 689 | returns Box from Bnd |
197ac94e | 690 | is static; |
691 | ---Level: Public | |
692 | ---Purpose: Returns the coordinates of the boundary box of all | |
693 | -- structures in the set <theSet>. | |
694 | -- If <theToIgnoreInfiniteFlag> is TRUE, then the boundary box | |
695 | -- also includes minimum and maximum limits of graphical elements | |
197ac94e | 696 | -- forming parts of infinite structures. |
7fd59977 | 697 | |
698 | NumberOfDisplayedStructures ( me ) | |
699 | returns Integer from Standard | |
700 | is static; | |
701 | ---Level: Internal | |
702 | ---Purpose: Returns number of displayed structures in | |
703 | -- the view <me>. | |
704 | ||
197ac94e | 705 | Projects (me; |
7fd59977 | 706 | AX, AY, AZ : Real from Standard; |
707 | APX, APY, APZ : out Real from Standard ) | |
708 | is static; | |
709 | ---Level: Public | |
710 | ---Purpose: Returns the coordinates of the projection of the | |
711 | -- 3d coordinates <AX>, <AY>, <AZ>. | |
712 | ||
b5ac8292 | 713 | DefaultCamera (me) |
714 | returns Camera_Handle from Graphic3d | |
715 | is static; | |
716 | ---Level: Public | |
717 | ---Purpose: @return the default camera of <me>. | |
718 | ---C++: return const & | |
7fd59977 | 719 | |
b5ac8292 | 720 | Camera (me) |
721 | returns Camera_Handle from Graphic3d | |
722 | is static; | |
723 | ---Level: Public | |
724 | ---Purpose: @return the camera of <me>. | |
725 | ---C++: return const & | |
7fd59977 | 726 | |
b5ac8292 | 727 | SetCamera (me : mutable; theCamera : Camera_Handle from Graphic3d) is static; |
728 | ---Level: Public | |
729 | ---Purpose: Set camera object to provide orientation and projection matrices | |
730 | -- for graphic driver. | |
7fd59977 | 731 | |
732 | Window ( me ) | |
733 | returns Window from Aspect | |
734 | ---Level: Public | |
735 | ---Purpose: Returns the window associated to the view <me>. | |
736 | -- Warning: Raises ViewDefinitionError if the associated | |
737 | -- window isn't defined. | |
738 | raises ViewDefinitionError from Visual3d is static; | |
739 | ||
740 | LightLimit ( me ) returns Integer is static; | |
741 | ---Level: Public | |
742 | ---Purpose: Returns the MAX number of light associated to the view <me>. | |
743 | ||
744 | PlaneLimit ( me ) returns Integer is static; | |
745 | ---Level: Public | |
746 | ---Purpose: Returns the MAX number of clipping planes | |
747 | -- associated to the view <me>. | |
748 | ||
749 | ViewManager ( me ) returns ViewManager from Visual3d is static; | |
750 | ---Level: Advanced | |
751 | ---Purpose: Returns the view manager handle which manage this view | |
752 | ||
753 | ---------------------------- | |
754 | -- Category: Private methods | |
755 | ---------------------------- | |
756 | ||
a1954302 | 757 | acceptDisplay ( me; |
758 | theStructType : TypeOfStructure from Graphic3d ) | |
759 | returns TypeOfAnswer from Visual3d | |
760 | is static private; | |
761 | ---Level: Internal | |
762 | ---Purpose: Is it possible to display the structure in the view? | |
7fd59977 | 763 | |
764 | ReCompute ( me : mutable; | |
765 | AStructure : Structure from Graphic3d ); | |
766 | ---Level: Advanced | |
767 | ---Purpose: Computes the new presentation of the | |
768 | -- structure <AStructure> displayed in <me> | |
769 | -- with the type Graphic3d_TOS_COMPUTED. | |
770 | ---Category: Private methods | |
771 | ||
772 | Compute ( me : mutable ) is static private; | |
773 | ---Level: Internal | |
774 | ---Purpose: Computes the new presentation of the | |
775 | -- Structures displayed in <me> with the type | |
776 | -- Graphic3d_TOS_COMPUTED. | |
777 | ---Category: Private methods | |
778 | ||
779 | ChangeDisplayPriority ( me : mutable; | |
780 | AStructure : Structure from Graphic3d; | |
781 | OldPriority : Integer from Standard; | |
782 | NewPriority : Integer from Standard ) | |
783 | is static private; | |
784 | ---Level: Internal | |
785 | ---Purpose: Changes the display priority of the structure <AStructure>. | |
786 | ---Category: Private methods | |
787 | ||
c5751993 | 788 | |
789 | SetZLayerSettings ( me : mutable; | |
a1954302 | 790 | theLayerId : ZLayerId from Graphic3d; |
c5751993 | 791 | theSettings : ZLayerSettings from Graphic3d ) |
792 | is static private; | |
793 | ---Purpose: Sets the settings for a single Z layer of specified view. | |
794 | ||
59f45b7c | 795 | AddZLayer ( me : mutable; |
a1954302 | 796 | theLayerId : ZLayerId from Graphic3d ) |
59f45b7c | 797 | is static private; |
798 | ---Purpose: Add a new top-level Z layer to the view with ID | |
799 | -- <theLayerId>. The z layer mechanism allows to display | |
800 | -- structures in higher layers in overlay of structures in lower layers. | |
801 | -- The layers in a particular view should be managed centrally | |
802 | -- by its view manager so to avoid IDs mismatching and provide correct | |
803 | -- display of graphics in all views. | |
804 | ||
805 | RemoveZLayer ( me : mutable; | |
a1954302 | 806 | theLayerId : ZLayerId from Graphic3d ) |
59f45b7c | 807 | is static private; |
808 | ---Purpose: Remove z layer from the view by its ID. | |
809 | ||
810 | ChangeZLayer ( me : mutable; | |
811 | theStructure : Structure from Graphic3d; | |
a1954302 | 812 | theLayerId : ZLayerId from Graphic3d ) |
59f45b7c | 813 | is static private; |
814 | ---Purpose: Change Z layer of already displayed structure in the view. | |
815 | ||
7fd59977 | 816 | Clear ( me : mutable; |
817 | AStructure : Structure from Graphic3d; | |
818 | WithDestruction : Boolean from Standard ) | |
819 | is static private; | |
820 | ---Level: Internal | |
821 | ---Purpose: Clears the structure <AStructure> to the view <me>. | |
822 | ---Category: Private methods | |
823 | ||
824 | Connect ( me : mutable; | |
825 | AMother : Structure from Graphic3d; | |
826 | ADaughter : Structure from Graphic3d ) | |
827 | is static private; | |
828 | ---Level: Internal | |
829 | ---Purpose: Connects the structures <AMother> and <ADaughter>. | |
830 | ---Category: Private methods | |
831 | ||
832 | Disconnect ( me : mutable; | |
833 | AMother : Structure from Graphic3d; | |
834 | ADaughter : Structure from Graphic3d ) | |
835 | is static private; | |
836 | ---Level: Internal | |
837 | ---Purpose: Disconnects the structures <AMother> and <ADaughter>. | |
838 | ---Category: Private methods | |
839 | ||
840 | Display ( me : mutable; | |
841 | AStructure : Structure from Graphic3d ) | |
842 | is static private; | |
843 | ---Level: Internal | |
844 | ---Purpose: Display the structure <AStructure> to the view <me>. | |
845 | ---Category: Private methods | |
846 | ||
847 | Display ( me : mutable; | |
848 | AStructure : Structure from Graphic3d; | |
849 | AnUpdateMode : TypeOfUpdate from Aspect ) | |
850 | is static private; | |
851 | ---Level: Internal | |
852 | ---Purpose: Display the structure <AStructure> to the view <me>. | |
853 | ---Category: Private methods | |
854 | ||
679ecdee | 855 | DisplayImmediate ( me : mutable; |
856 | theStructure : Structure from Graphic3d; | |
857 | theIsSingleView : Boolean from Standard = Standard_True) | |
858 | returns Boolean from Standard | |
859 | is static; | |
860 | ---Level: Internal | |
861 | ---Purpose: Add structure to the list of immediate presentations. | |
862 | -- @return true if structure has not been registered in this view | |
863 | ||
864 | EraseImmediate ( me : mutable; | |
865 | theStructure : Structure from Graphic3d ) | |
866 | returns Boolean from Standard | |
867 | is static; | |
868 | ---Level: Internal | |
869 | ---Purpose: Removes the structure from the list of immediate presentations. | |
870 | -- @return true if structure has been registered in view | |
871 | ||
872 | ClearImmediate ( me : mutable ) | |
873 | returns Boolean from Standard | |
874 | is static; | |
875 | ---Level: Internal | |
876 | ---Purpose: Clears list of immediate presentations. | |
877 | -- @return true if list was not empty | |
878 | ||
7fd59977 | 879 | Erase ( me : mutable; |
880 | AStructure : Structure from Graphic3d ) | |
881 | is static private; | |
882 | ---Level: Internal | |
883 | ---Purpose: Erases the structure <AStructure> from the view <me>. | |
884 | ---Category: Private methods | |
885 | ||
886 | Erase ( me : mutable; | |
887 | AStructure : Structure from Graphic3d; | |
888 | AnUpdateMode : TypeOfUpdate from Aspect ) | |
889 | is static private; | |
890 | ---Level: Internal | |
891 | ---Purpose: Erases the structure <AStructure> from the view <me>. | |
892 | ---Category: Private methods | |
893 | ||
7fd59977 | 894 | Highlight ( me : mutable; |
895 | AStructure : Structure from Graphic3d; | |
896 | AMethod : TypeOfHighlightMethod from Aspect ) | |
897 | is static private; | |
898 | ---Level: Internal | |
899 | ---Purpose: Highlights the structure <AStructure> in the view <me>. | |
900 | ---Category: Private methods | |
901 | ||
902 | SetTransform ( me : mutable; | |
903 | AStructure : Structure from Graphic3d; | |
904 | ATrsf : Array2OfReal from TColStd ) | |
905 | is static private; | |
906 | ---Level: Internal | |
907 | ---Purpose: Transforms the structure <AStructure> in the view <me>. | |
908 | ---Category: Private methods | |
909 | ||
910 | UnHighlight ( me : mutable; | |
911 | AStructure : Structure from Graphic3d ) | |
912 | is static private; | |
913 | ---Level: Internal | |
914 | ---Purpose: Suppress the highlighting on the structure <AStructure> | |
915 | -- in the view <me>. | |
916 | ---Category: Private methods | |
917 | ||
918 | IsComputed ( me; | |
919 | AStructure : Structure from Graphic3d ) | |
920 | returns Integer from Standard | |
921 | is static private; | |
922 | ---Level: Internal | |
923 | ---Purpose: Returns an index != 0 if the structure <AStructure> | |
924 | -- have another structure computed for the view <me>. | |
925 | ---Category: Private methods | |
926 | ||
927 | Identification ( me ) | |
928 | returns Integer from Standard | |
929 | is static; | |
930 | ---Level: Internal | |
931 | ---Purpose: Returns the identification number of the view <me>. | |
932 | ---Category: Private methods | |
933 | ||
934 | IsDisplayed ( me; | |
935 | AStructure : Structure from Graphic3d ) | |
936 | returns Boolean from Standard | |
937 | is static private; | |
938 | ---Level: Internal | |
939 | ---Purpose: Returns true if the structure <AStructure> is | |
940 | -- displayed in the view <me>. | |
941 | ---Category: Private methods | |
942 | ||
7fd59977 | 943 | SetRatio ( me : mutable ) |
944 | is static private; | |
945 | ---Level: Internal | |
946 | ---Purpose: Modifies the aspect ratio of the view <me> when the | |
947 | -- associated window is defined or resized. | |
948 | ---Category: Private methods | |
949 | ||
950 | UpdateLights ( me : mutable ) | |
951 | is static private; | |
952 | ---Level: Internal | |
953 | ---Purpose: Updates the lights when the associated window is defined | |
954 | -- and when the view is activated. | |
955 | ---Category: Private methods | |
956 | ||
957 | UpdatePlanes ( me : mutable ) | |
958 | is static private; | |
959 | ---Level: Internal | |
960 | ---Purpose: Updates the planes when the associated window is defined | |
961 | -- and when the view is activated. | |
962 | ---Category: Private methods | |
963 | ||
964 | UpdateView ( me : mutable ) | |
965 | is static private; | |
966 | ---Level: Internal | |
967 | ---Purpose: Updates the associated c structure before a call to the | |
968 | -- graphic library. | |
969 | ---Category: Private methods | |
970 | ||
971 | ----------------------------- | |
972 | -- Category: Internal methods | |
973 | ----------------------------- | |
974 | ||
975 | CView ( me ) | |
976 | returns Address from Standard | |
977 | is static; | |
978 | ---Level: Internal | |
979 | ---Purpose: Returns the c structure associated to <me>. | |
980 | ---Category: Private methods | |
981 | ||
982 | GraphicDriver ( me ) | |
6942f04a | 983 | returns GraphicDriver from Graphic3d |
7fd59977 | 984 | is static; |
985 | ---Level: Internal | |
986 | ---Purpose: Returns the associated GraphicDriver. | |
987 | ---Category: Internal methods | |
dc3fe572 | 988 | ---C++: return const & |
7fd59977 | 989 | |
990 | HaveTheSameOwner ( me; | |
991 | AStructure : Structure from Graphic3d ) | |
992 | returns Integer from Standard | |
993 | is static private; | |
994 | ---Level: Internal | |
995 | ---Purpose: Returns an index != 0 if the structure <AStructure> | |
996 | -- have the same owner than another structure in the | |
997 | -- sequence of the computed structures. | |
7fd59977 | 998 | ---Category: Private methods |
999 | ||
7edf74fd A |
1000 | Print (me; AnUnderLayer : Layer from Visual3d; |
1001 | AnOverLayer : Layer from Visual3d; | |
1002 | hPrnDC : Handle from Aspect; | |
1003 | showBackground : Boolean; | |
1004 | filename : CString; | |
1005 | printAlgorithm : PrintAlgo from Aspect = Aspect_PA_STRETCH; | |
1006 | theScaleFactor : Real from Standard = 1.0) | |
1007 | returns Boolean from Standard is static; | |
7fd59977 | 1008 | |
1009 | ---Level: Internal | |
1010 | ---Purpose: print the contents of all layers of the view to the printer. | |
1011 | -- <hPrnDC> : Pass the PrinterDeviceContext (HDC), | |
1012 | -- <showBackground> : When set to FALSE then print the view without background color | |
1013 | -- (background is white) | |
1014 | -- else set to TRUE for printing with current background color. | |
1015 | -- <filename>: If != NULL, then the view will be printed to a file. | |
7edf74fd A |
1016 | -- <printAlgo>: Select print algorithm: stretch, tile. |
1017 | -- <theScaleFactor>: Scaling coefficient, used internally to scale the | |
1018 | -- printings accordingly to the scale factor selected in the printer | |
1019 | -- properties dialog. | |
1020 | -- Returns Standard_True if the data is passed to the printer, otherwise | |
1021 | -- Standard_False if the print operation failed due to printer error | |
1022 | -- or insufficient memory. | |
7fd59977 | 1023 | -- Warning: Works only under Windows. |
1024 | ||
7edf74fd A |
1025 | Print (me; hPrnDC : Handle from Aspect; |
1026 | showBackground : Boolean; | |
1027 | filename : CString; | |
1028 | printAlgorithm : PrintAlgo from Aspect = Aspect_PA_STRETCH; | |
1029 | theScaleFactor : Real from Standard = 1.0 ) | |
1030 | returns Boolean from Standard is static; | |
7fd59977 | 1031 | |
1032 | ---Level: Internal | |
1033 | ---Purpose: print the contents of the view to printer. | |
1034 | -- <hPrnDC> : Pass the PrinterDeviceContext (HDC), | |
1035 | -- <showBackground> : When set to FALSE then print the view without background color | |
1036 | -- (background is white) | |
1037 | -- else set to TRUE for printing with current background color. | |
1038 | -- <filename>: If != NULL, then the view will be printed to a file. | |
7edf74fd A |
1039 | -- <printAlgo>: Select print algorithm: stretch, tile. |
1040 | -- <theScaleFactor>: Scaling coefficient, used internally to scale the | |
1041 | -- printings accordingly to the scale factor selected in the printer | |
1042 | -- properties dialog. | |
1043 | -- Returns Standard_True if the data is passed to the printer, otherwise | |
1044 | -- Standard_False if the print operation failed due to printer error | |
1045 | -- or insufficient memory. | |
7fd59977 | 1046 | -- Warning: Works only under Windows. |
1047 | ||
7fd59977 | 1048 | ZBufferIsActivated ( me ) |
1049 | returns Boolean from Standard | |
1050 | is static; | |
1051 | ---Level: Advanced | |
1052 | ---Purpose: Returns Standard_True if the ZBuffer is activated | |
1053 | -- in the view <me> and Standard_False if not. | |
1054 | ---Category: Internal methods | |
1055 | ||
1056 | SetZBufferActivity ( me : mutable; AnActivity : Integer from Standard ) | |
1057 | is static; | |
1058 | ---Level: Advanced | |
1059 | ---Purpose: Activates the ZBuffer if the integer <AnActivity> | |
1060 | -- is equal to 1. | |
1061 | -- Deactivates the ZBuffer if the integer <AnActivity> | |
1062 | -- is equal to 0. | |
1063 | -- If the integer <AnActivity> is equal to -1 then | |
1064 | -- - the ZBuffer is activated if | |
1065 | -- me->Context ().Visualization () == Visual3d_TOV_SHADING | |
1066 | -- - the ZBuffer is deactivated if | |
1067 | -- me->Context ().Visualization () == Visual3d_TOV_WIREFRAME | |
1068 | ---Category: Internal methods | |
1069 | ||
1070 | UnderLayer ( me ) | |
1071 | returns Layer from Visual3d; | |
1072 | ---Level: Internal | |
1073 | ---Purpose: Returns the underlay of the view <me>. | |
1074 | ---Category: Private methods | |
1075 | ---C++: return const & | |
1076 | ||
1077 | OverLayer ( me ) | |
1078 | returns Layer from Visual3d; | |
1079 | ---Level: Internal | |
1080 | ---Purpose: Returns the underlay of the view <me>. | |
1081 | ---Category: Private methods | |
1082 | ---C++: return const & | |
1083 | ||
1084 | EnableDepthTest( me; enable : Boolean from Standard ) | |
1085 | is static; | |
1086 | ---Level: Public | |
1087 | ---Purpose: turns on/off opengl depth | |
1088 | ||
1089 | IsDepthTestEnabled( me ) returns Boolean from Standard | |
1090 | is static; | |
1091 | ---Level: Public | |
1092 | ---Purpose: returns current state of the opengl depth testing | |
1093 | ||
1094 | ReadDepths( me; x,y,width,height: Integer from Standard; | |
1095 | buffer : Address ) | |
1096 | is static; | |
1097 | ---Purpose: Reads depths of shown pixels of the given rectangle | |
1098 | ||
1099 | FBOCreate( me : mutable; width,height: Integer from Standard ) | |
1100 | returns PtrFrameBuffer from Graphic3d | |
1101 | is static; | |
1102 | ---Level: Public | |
1103 | ---Purpose: Generate offscreen FBO in the graphic library | |
1104 | ||
1105 | FBORelease( me : mutable; | |
1106 | fboPtr : in out PtrFrameBuffer from Graphic3d ) | |
1107 | is static; | |
1108 | ---Level: Public | |
1109 | ---Purpose: Remove offscreen FBO from the graphic library | |
1110 | ||
1111 | FBOGetDimensions( me : mutable; | |
1112 | fboPtr : PtrFrameBuffer from Graphic3d; | |
1113 | width, height : out Integer from Standard; | |
1114 | widthMax, heightMax : out Integer from Standard ) | |
1115 | is static; | |
1116 | ---Level: Public | |
1117 | ---Purpose: Read offscreen FBO configuration. | |
1118 | ||
1119 | FBOChangeViewport( me : mutable; | |
1120 | fboPtr : in out PtrFrameBuffer from Graphic3d; | |
1121 | width, height : Integer from Standard ) | |
1122 | is static; | |
1123 | ---Level: Public | |
1124 | ---Purpose: Change offscreen FBO viewport. | |
1125 | ||
1126 | BufferDump( me : mutable; | |
692613e5 | 1127 | theImage : in out PixMap from Image; |
1128 | theBufferType : BufferType from Graphic3d ) | |
7fd59977 | 1129 | returns Boolean from Standard |
1130 | is static; | |
1131 | ---Level: Public | |
1132 | ---Purpose: Dump active rendering buffer into specified memory buffer. | |
1133 | ||
1134 | EnableGLLight( me; enable : Boolean from Standard ) | |
1135 | is static; | |
1136 | ---Level: Public | |
1137 | ---Purpose: turns on/off opengl lighting, currently used in triedron displaying | |
1138 | ||
1139 | IsGLLightEnabled( me ) returns Boolean from Standard | |
1140 | is static; | |
1141 | ---Level: Public | |
1142 | ---Purpose: returns the current state of the gl lighting | |
1143 | -- currently used in triedron displaying | |
1144 | ||
1145 | Export( me; | |
5cedc27f K |
1146 | theFileName : CString from Standard; |
1147 | theFormat : ExportFormat from Graphic3d; | |
1148 | theSortType : SortType from Graphic3d = Graphic3d_ST_BSP_Tree; | |
1149 | thePrecision : Real from Standard = 0.005; | |
1150 | theProgressBarFunc : Address from Standard = NULL; | |
1151 | theProgressObject : Address from Standard = NULL ) | |
1152 | returns Boolean from Standard; | |
1153 | ---Purpose: | |
1154 | -- Export scene into the one of the Vector graphics formats (SVG, PS, PDF...). | |
1155 | -- In contrast to Bitmaps, Vector graphics is scalable (so you may got quality benefits on printing to laser printer). | |
1156 | -- Notice however that results may differ a lot and do not contain some elements. | |
7fd59977 | 1157 | |
1158 | fields | |
1159 | ||
d4f1753b | 1160 | -- the ViewManager associated with the view |
1161 | myViewManager : ViewManagerPtr from Visual3d; | |
679ecdee | 1162 | |
1163 | -- the associated C structure | |
1164 | MyCView : CView from Graphic3d; | |
7fd59977 | 1165 | |
679ecdee | 1166 | -- the context of the view : Aliasing, Depth-Cueing, Lights ... |
1167 | MyContext : ContextView from Visual3d; | |
7fd59977 | 1168 | |
679ecdee | 1169 | -- the associated window |
1170 | MyWindow : Window from Aspect; | |
7fd59977 | 1171 | |
679ecdee | 1172 | -- association Structure_COMPUTE and Structure_Computed |
d4f1753b | 1173 | myStructsToCompute : SequenceOfStructure from Graphic3d; |
1174 | myStructsComputed : SequenceOfStructure from Graphic3d; | |
1175 | myIsInComputedMode : Boolean from Standard; | |
7fd59977 | 1176 | |
679ecdee | 1177 | -- the graphic driver used |
d4f1753b | 1178 | myGraphicDriver : GraphicDriver from Graphic3d; |
7fd59977 | 1179 | |
679ecdee | 1180 | -- the background of the associated window |
1181 | MyBackground : Background from Aspect; | |
7fd59977 | 1182 | |
679ecdee | 1183 | -- the gradient background of the associated window |
1184 | MyGradientBackground : GradientBackground from Aspect; | |
7fd59977 | 1185 | |
679ecdee | 1186 | -- the displayed structures in the view |
d4f1753b | 1187 | myStructsDisplayed : MapOfStructure from Graphic3d; |
679ecdee | 1188 | myImmediateStructures : MapOfStructure from Graphic3d; |
7fd59977 | 1189 | |
679ecdee | 1190 | MyGTrihedron : CGraduatedTrihedron from Graphic3d; |
13a22457 | 1191 | |
679ecdee | 1192 | myDefaultCamera : Camera_Handle from Graphic3d; |
b5ac8292 | 1193 | |
6bc6a6fc | 1194 | myAutoZFitIsOn : Boolean from Standard; |
1195 | myAutoZFitScaleFactor : Real from Standard; | |
1196 | ||
1197 | myStructuresUpdated : Boolean from Standard; | |
1198 | ||
7fd59977 | 1199 | friends |
1200 | ||
679ecdee | 1201 | class ViewManager from Visual3d |
7fd59977 | 1202 | |
1203 | end View; |