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