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