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