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