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