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