1 -- Created on: 1992-01-15
3 -- Copyright (c) 1992-1999 Matra Datavision
4 -- Copyright (c) 1999-2014 OPEN CASCADE SAS
6 -- This file is part of Open CASCADE Technology software library.
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.
14 -- Alternatively, this file may be used under the terms of Open CASCADE
15 -- commercial license or contractual agreement.
17 -- Modified: FMN - 24/12/97 -> Suppression GEOMLITE
18 -- stt:25-02-98; S3558: ajout IfManageStandardEvent
19 -- stt:08-04-98; suppr IfManageStandardEvent
20 -- CAL - 18/08/98 -> S3892. Ajout grilles 3d.
21 -- BGN - 16-09-98; Points d'entree du Triedre (S3819, Phase 1)
22 -- 22-09-98 ; BGN : S3989 (anciennement S3819)
23 -- TypeOfTriedron* from Aspect(et pas V3d)
24 -- CAL - 21/10/98 -> Speciale. Ajout methode Tumble.
25 -- 29-OCT-98 : DCB : Adding ScreenCopy () method.
26 -- GG - 24/01/00 : -> Remove internal PixToRef() method, use Convert()
28 -- -> Rename internal RefToPix() to Convert() method.
29 -- -> Add ConvertToGrid() methods,
30 -- the Compute() internal method become private.
31 -- -> Add SetProjModel() method.
32 -- VKH - 15/11/99 : G004
33 -- -> Add method Dump()
34 -- THA - 17/08/00 Thomas HARTL <t-hartl@muenchen.matra-dtv.fr>
35 -- -> Add Print method (works only under Windows).
37 -- -> Add EnableDepthTest() & IsDepthTestEnabled().
38 -- VSV - 28/05/02: ZBUFFER mode of Trihedron
39 -- SAV - 23/12/02 -> Added methods to set background image
40 -- NKV - 23/07/07 -> Define custom projection and model view matrixes
41 -- NKV - 08/02/07 -> Add ConvertWithProj() method
43 class View from V3d inherits TShared from MMgt
45 ---Purpose: Defines the application object VIEW for the
46 -- VIEWER application.
47 -- The methods of this class allow the editing
48 -- and inquiring the parameters linked to the view.
49 -- (Projection,Mapping,Zclipping,DepthCueing,AntiAliasing
51 -- Provides a set of services common to all types of view.
52 -- Warning: The default parameters are defined by the class
53 -- Viewer (Example : SetDefaultViewSize()).
54 -- Certain methods are mouse oriented, and it is
55 -- necessary to know the difference between the start and
56 -- the continuation of this gesture in putting the method
58 -- Example : Shifting the eye-view along the screen axes.
60 -- View->Move(10.,20.,0.,True) (Starting motion)
61 -- View->Move(15.,-5.,0.,False) (Next motion)
71 ColorScale from Aspect,
72 Array2OfReal from TColStd,
75 Structure from Graphic3d,
78 ListOfTransient from V3d,
79 ListIteratorOfListOfTransient from TColStd,
82 TypeOfOrientation from V3d,
83 TypeOfShadingModel from V3d,
84 TypeOfSurfaceDetail from V3d,
85 TextureEnv from Graphic3d,
86 TypeOfVisualization from V3d,
87 TypeOfZclipping from V3d,
88 TypeOfBackfacingModel from V3d,
89 StereoDumpOptions from V3d,
93 ContextView from Visual3d,
94 Vector from Graphic3d,
95 Vertex from Graphic3d,
96 Camera from Graphic3d,
99 BufferType from Graphic3d,
100 Background from Aspect,
101 GradientBackground from Aspect,
102 TypeOfColor from Quantity,
103 NameOfColor from Quantity,
105 Length from Quantity,
106 PlaneAngle from Quantity,
107 Parameter from Quantity,
108 Factor from Quantity,
110 Coefficient from Quantity,
112 Array2OfReal from TColStd,
113 ViewerPointer from V3d,
114 TypeOfTriedronEcho from Aspect,
115 TypeOfTriedronPosition from Aspect,
116 RenderingContext from Aspect,
117 GraphicCallbackProc from Aspect,
118 FillMethod from Aspect,
119 GradientFillMethod from Aspect,
120 FontAspect from Font,
121 AsciiString from TCollection,
122 ExtendedString from TCollection,
123 PrintAlgo from Aspect,
124 ClipPlane from Graphic3d,
125 GraduatedTrihedron from Graphic3d,
126 SequenceOfHClipPlane from Graphic3d,
127 RenderingMode from Graphic3d,
128 RenderingParams from Graphic3d,
133 BadValue from V3d, TypeMismatch from Standard,
134 MultiplyDefined from Standard,UnMapped from V3d
138 Create ( VM : Viewer; Type : TypeOfView from V3d = V3d_ORTHOGRAPHIC );
139 ---Purpose: Initializes the view.
141 Create (theVM : Viewer; theView : View from V3d);
142 ---Purpose: Initializes the view by copying.
144 --------------------------------------------------------
145 ---Category: Methods to modify the Status of the view
146 --------------------------------------------------------
148 SetWindow ( me : mutable ; IdWin : Window )
149 ---Purpose: Activates the view in the window specified and Map the
150 -- Window to the screen.
151 raises MultiplyDefined from Standard;
153 ---Purpose: Warning! raises MultiplyDefined from Standard
154 -- if the view is already activated in a window.
155 -- Warning: The view is centered and resized to preserve
156 -- the height/width ratio of the window.
158 SetWindow ( me : mutable ;
159 aWindow : Window from Aspect;
160 aContext : RenderingContext from Aspect;
161 aDisplayCB : GraphicCallbackProc from Aspect;
162 aClientData : Address from Standard
164 ---Purpose: Activates the view in the specified Window
165 -- If <aContext> is not NULL the graphic context is used
166 -- to draw something in this view.
167 -- Otherwise an internal graphic context is created.
168 -- If <aDisplayCB> is not NULL then a user display CB is
169 -- call at the end of the OCC graphic traversal and just
170 -- before the swap of buffers. The <aClientData> is pass
171 -- to this call back.
172 raises MultiplyDefined from Standard;
174 ---Purpose: Warning! raises MultiplyDefined from Standard
175 -- if the view is already activated in a window.
176 -- Warning: The view is centered and resized to preserve
177 -- the height/width ratio of the window.
179 SetMagnify (me: mutable; IdWin : Window;
180 aPreviousView : View from V3d;
181 x1 , y1 , x2 , y2: Integer from Standard)
186 ---Purpose: Destroys the view.
188 Update ( me ) is static;
190 ---Purpose: Deprecated, Redraw() should be used instead.
194 ---Purpose: Redisplays the view even if there has not
195 -- been any modification.
196 -- Must be called if the view is shown.
197 -- (Ex: DeIconification ) .
199 RedrawImmediate ( me );
201 ---Purpose: Updates layer of immediate presentations.
205 ---Purpose: Invalidates view content but does not redraw it.
207 Redraw ( me ;x,y,width,height: Integer from Standard);
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.
213 MustBeResized ( me : mutable )
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.
222 DoMapping ( me : mutable );
224 ---Purpose: Must be called when the window supporting the
225 -- view is mapped or unmapped.
227 IsEmpty ( me ) returns Boolean;
229 ---Purpose: Returns the status of the view regarding
230 -- the displayed structures inside
231 -- Returns True is The View is empty
235 ---Purpose: Updates the lights of the view. The view is redrawn.
237 AutoZFit (me : mutable);
239 ---Purpose: If automatic z-range fitting is turned on, adjusts Z-min and Z-max
240 -- projection volume planes with call to ZFitAll.
242 ZFitAll (me : mutable; theScaleFactor : Real from Standard = 1.0);
244 ---Purpose: Change Z-min and Z-max planes of projection volume to match the
245 -- displayed objects.
247 --------------------------------------------------------
248 ---Category: Methods to modify the Attributes of the view
249 --------------------------------------------------------
251 SetBackgroundColor ( me : mutable ;
252 Type : TypeOfColor; V1, V2, V3 : Parameter );
254 ---Purpose: Defines the background colour of the view
256 -- the colour definition type,
257 -- and the three corresponding values.
259 SetBackgroundColor ( me : mutable ; Color : Color from Quantity );
261 ---Purpose: Defines the background colour of the view
263 -- the colour object.
265 SetBackgroundColor ( me : mutable ; Name : NameOfColor );
267 ---Purpose: Defines the background colour of the view
269 -- the colour name in the form Quantity_NOC_xxxx .
271 SetBgGradientColors ( me : mutable ;
272 Color1 : Color from Quantity;
273 Color2 : Color from Quantity;
274 FillStyle : GradientFillMethod from Aspect = Aspect_GFM_HOR;
275 update : Boolean from Standard = Standard_False );
277 ---Purpose: Defines the gradient background colours of the view
279 -- two colour objects,
280 -- and fill method (horizontal by default)
282 SetBgGradientColors ( me : mutable ;
283 Color1 : NameOfColor;
284 Color2 : NameOfColor;
285 FillStyle : GradientFillMethod from Aspect = Aspect_GFM_HOR;
286 update : Boolean from Standard = Standard_False );
288 ---Purpose: Defines the gradient background colours of the view
290 -- two colour names in the form Quantity_NOC_xxxx,
291 -- and fill method (horizontal by default)
293 SetBgGradientStyle( me : mutable ;
294 AMethod : GradientFillMethod from Aspect = Aspect_GFM_HOR;
295 update : Boolean from Standard = Standard_False);
297 ---Purpose: Defines the gradient background fill method of the view
299 SetBackgroundImage( me : mutable; FileName : CString from Standard;
300 FillStyle : FillMethod from Aspect = Aspect_FM_CENTERED;
301 update : Boolean from Standard = Standard_False );
303 ---Purpose: Defines the background texture of the view
305 --- texture image file name,
306 --- and fill method (centered by default)
308 SetBgImageStyle( me : mutable; FillStyle : FillMethod from Aspect;
309 update : Boolean from Standard = Standard_False );
311 ---Purpose: Defines the textured background fill method of the view
313 SetAxis ( me : mutable; X,Y,Z : Coordinate ;
314 Vx,Vy,Vz : Parameter )
316 ---Purpose: Definition of an axis from its origin and
318 -- This will be the current axis for rotations and movements.
319 raises BadValue from V3d;
320 ---Purpose: Warning! raises BadValue from V3d if the vector normal is NULL. .
322 SetShadingModel ( me : mutable; Model : TypeOfShadingModel );
324 ---Purpose: Defines the shading model for the
325 -- visualisation ZBUFFER mode.
326 -- Various models are available.
328 SetSurfaceDetail(me : mutable; SurfaceDetail : TypeOfSurfaceDetail);
330 ---Purpose: select the kind of rendering for texture mapping
331 -- no texture mapping by default
333 SetTextureEnv(me : mutable; ATexture : TextureEnv from Graphic3d);
335 ---Purpose: set the environment texture to use
336 -- no environment texture by default
338 SetVisualization ( me : mutable;
339 Mode : TypeOfVisualization from V3d );
341 ---Purpose: Defines the visualisation mode in the view.
343 SetAntialiasingOn ( me : mutable );
345 ---Purpose: Activates antialiasing in the view.
347 SetAntialiasingOff ( me : mutable );
349 ---Purpose: Desactivates antialiasing in the view.
351 SetZClippingDepth ( me : mutable; Depth : Length );
353 ---Purpose: Defines the depth of the medium clipping plane.
355 SetZClippingWidth ( me : mutable; Width : Length )
357 ---Purpose: Defines the thicknes around the medium clippling plane. .
358 raises BadValue from V3d;
359 -- If the thickness is <= 0
361 SetZClippingType ( me : mutable; Type : TypeOfZclipping );
363 ---Purpose: Defines the type of ZClipping.
365 SetZCueingDepth ( me : mutable; Depth : Length );
367 ---Purpose: Defines the depth of the medium plane.
369 SetZCueingWidth ( me : mutable; Width : Length )
371 ---Purpose: Defines the thickness around the medium plane.
372 raises BadValue from V3d;
373 -- If thickness is <= 0
375 SetZCueingOn ( me : mutable );
377 ---Purpose: Activates ZCueing in the view.
379 SetZCueingOff ( me : mutable );
381 ---Purpose: Desactivates ZCueing in the view.
383 SetLightOn( me : mutable ; MyLight : Light from V3d )
385 ---Purpose: Activates MyLight in the view.
386 raises BadValue from V3d;
387 -- If No More Light can be activated in MyView .
389 SetLightOn( me : mutable )
391 ---Purpose: Activates all the lights defined in this view.
392 raises BadValue from V3d;
393 -- If No More Light can be activated in MyView .
395 SetLightOff( me : mutable ; MyLight : Light from V3d );
397 ---Purpose: Desactivate MyLight in this view.
399 SetLightOff( me : mutable );
401 ---Purpose: Deactivate all the Lights defined in this view.
403 IsActiveLight( me ; aLight: Light from V3d )
404 returns Boolean from Standard;
406 ---Purpose: Returns TRUE when the light is active in this view.
408 SetImmediateUpdate(me: mutable; theImmediateUpdate: Boolean from Standard)
409 returns Boolean from Standard;
410 ---Purpose: sets the immediate update mode and returns the previous one.
412 ---------------------------------------------------
414 ---------------------------------------------------
416 ZBufferTriedronSetup ( me : mutable;
417 XColor : NameOfColor from Quantity = Quantity_NOC_RED;
418 YColor : NameOfColor from Quantity = Quantity_NOC_GREEN;
419 ZColor : NameOfColor from Quantity = Quantity_NOC_BLUE1;
420 SizeRatio : Real from Standard = 0.8;
421 AxisDiametr : Real from Standard = 0.05;
422 NbFacettes : Integer from Standard = 12)
425 ---Purpose: Customization of the ZBUFFER Triedron.
426 --- XColor,YColor,ZColor - colors of axis
427 --- SizeRatio - ratio of decreasing of the trihedron size when its phisical
428 --- position comes out of the view
429 --- AxisDiametr - diameter relatively to axis length
430 --- NbFacettes - number of facettes of cylinders and cones
432 TriedronDisplay ( me : mutable;
433 APosition : TypeOfTriedronPosition from Aspect = Aspect_TOTP_CENTER;
434 AColor : NameOfColor from Quantity = Quantity_NOC_WHITE ;
435 AScale : Real from Standard = 0.02;
436 AMode : TypeOfVisualization from V3d = V3d_WIREFRAME )
439 ---Purpose: Display of the Triedron.
440 --- Initialize position, color and length of Triedron axes.
441 --- The scale is a percent of the window width.
444 TriedronErase ( me : mutable )
447 ---Purpose: Erases the Triedron.
450 TriedronEcho ( me : mutable;
451 AType : TypeOfTriedronEcho from Aspect = Aspect_TOTE_NONE )
454 ---Purpose: Highlights the echo zone of the Triedron.
457 ---------------------------------
458 ---Category: Graduated trihedron
459 ---------------------------------
461 GetGraduatedTrihedron (me)
462 returns GraduatedTrihedron from Graphic3d
463 ---Purpose: Returns data of a graduated trihedron.
464 ---C++: return const&
467 GraduatedTrihedronDisplay(me : mutable;
468 theTrigedronData: in GraduatedTrihedron from Graphic3d)
469 ---Purpose: Displays a graduated trihedron.
472 GraduatedTrihedronErase(me : mutable)
473 ---Purpose: Erases a graduated trihedron from the view.
476 ---------------------------------------------------
477 -- Color Scale methods
478 ---------------------------------------------------
480 SetLayerMgr(me : mutable; aMgr : LayerMgr from V3d);
482 ColorScaleDisplay(me : mutable);
484 ColorScaleErase(me : mutable);
486 ColorScaleIsDisplayed(me)
487 returns Boolean from Standard;
490 returns ColorScale from Aspect;
492 --------------------------------------------------------
493 ---Category: Methods to modify the Projection of the view
494 --------------------------------------------------------
496 SetFront(me: mutable);
498 ---Purpose: modify the Projection of the view perpendicularly to
499 -- the privileged plane of the viewer.
501 Rotate ( me : mutable ; Ax,Ay,Az : PlaneAngle ;
502 Start : Boolean = Standard_True )
504 ---Purpose: Rotates the eye about the coordinate system of
505 -- reference of the screen
506 -- for which the origin is the view point of the projection,
507 -- with a relative angular value in RADIANS with respect to
508 -- the initial position expressed by Start = Standard_True
509 raises BadValue from V3d;
510 ---Purpose: Warning! raises BadValue from V3d
511 -- If the eye, the view point, or the high point are
512 -- aligned or confused.
514 Rotate ( me : mutable ; Ax,Ay,Az : PlaneAngle ;
516 Start : Boolean = Standard_True )
518 ---Purpose: Rotates the eye about the coordinate system of
519 -- reference of the screen
520 -- for which the origin is Gravity point {X,Y,Z},
521 -- with a relative angular value in RADIANS with respect to
522 -- the initial position expressed by Start = Standard_True
523 raises BadValue from V3d;
524 ---Purpose: If the eye, the view point, or the high point are
525 -- aligned or confused.
527 Rotate ( me : mutable ; Axe : TypeOfAxe ; Angle : PlaneAngle ;
529 Start : Boolean = Standard_True );
531 ---Purpose: Rotates the eye about one of the coordinate axes of
532 -- of the view for which the origin is the Gravity point{X,Y,Z}
533 -- with an relative angular value in RADIANS with
534 -- respect to the initial position expressed by
535 -- Start = Standard_True
537 Rotate ( me : mutable ; Axe : TypeOfAxe ; Angle : PlaneAngle ;
538 Start : Boolean = Standard_True ) ;
540 ---Purpose: Rotates the eye about one of the coordinate axes of
541 -- of the view for which the origin is the view point of the
542 -- projection with an relative angular value in RADIANS with
543 -- respect to the initial position expressed by
544 -- Start = Standard_True
546 Rotate ( me : mutable ; Angle : PlaneAngle ;
547 Start : Boolean = Standard_True );
549 ---Purpose: Rotates the eye around the current axis a relative
550 -- angular value in RADIANS with respect to the initial
551 -- position expressed by Start = Standard_True
553 Move ( me : mutable ; Dx,Dy,Dz : Length ;
554 Start : Boolean = Standard_True )
556 ---Purpose: Movement of the eye parallel to the coordinate system
557 -- of reference of the screen a distance relative to the
558 -- initial position expressed by Start = Standard_True.
559 raises BadValue from V3d;
560 -- If the eye, the view point, or the high point are
561 -- aligned or confused.
563 Move ( me : mutable ; Axe : TypeOfAxe ; Length : Length ;
564 Start : Boolean = Standard_True )
566 ---Purpose: Movement of the eye parallel to one of the axes of the
567 -- coordinate system of reference of the view a distance
568 -- relative to the initial position expressed by
569 -- Start = Standard_True.
570 raises BadValue from V3d;
571 -- If the eye, view point, or high point are aligned or confused.
573 Move ( me : mutable ; Length : Length ;
574 Start : Boolean = Standard_True )
576 ---Purpose: Movement of the eye parllel to the current axis
577 -- a distance relative to the initial position
578 -- expressed by Start = Standard_True
579 raises BadValue from V3d;
580 -- If the eye, view point, or high point are aligned or confused.
582 Translate ( me : mutable ; Dx,Dy,Dz : Length ;
583 Start : Boolean = Standard_True )
585 ---Purpose: Movement of the ye and the view point parallel to the
586 -- frame of reference of the screen a distance relative
587 -- to the initial position expressed by
588 -- Start = Standard_True
589 raises BadValue from V3d;
590 -- If the eye, view point, or high point are aligned or confused.
592 Translate ( me : mutable ; Axe : TypeOfAxe ; Length : Length ;
593 Start : Boolean = Standard_True );
595 ---Purpose: Movement of the eye and the view point parallel to one
596 -- of the axes of the fame of reference of the view a
597 -- distance relative to the initial position
598 -- expressed by Start = Standard_True
600 Translate ( me : mutable ; Length : Length ;
601 Start : Boolean = Standard_True );
603 ---Purpose: Movement of the eye and view point parallel to
604 -- the current axis a distance relative to the initial
605 -- position expressed by Start = Standard_True
608 theXp : Integer from Standard;
609 theYp : Integer from Standard;
610 theZoomFactor : Factor from Quantity = 1)
612 ---Purpose: places the point of the view corresponding
613 -- at the pixel position x,y at the center of the window
614 -- and updates the view.
617 Turn ( me : mutable ; Ax,Ay,Az : PlaneAngle ;
618 Start : Boolean = Standard_True )
620 ---Purpose: Rotation of the view point around the frame of reference
621 -- of the screen for which the origin is the eye of the
622 -- projection with a relative angular value in RADIANS
623 -- with respect to the initial position expressed by
624 -- Start = Standard_True
625 raises BadValue from V3d;
626 -- If the eye, view point, or high point are aligned or confused.
628 Turn ( me : mutable ; Axe : TypeOfAxe ; Angle : PlaneAngle ;
629 Start : Boolean = Standard_True )
632 ---Purpose: Rotation of the view point around one of the axes of the
633 -- frame of reference of the view for which the origin is
634 -- the eye of the projection with an angular value in
635 -- RADIANS relative to the initial position expressed by
636 -- Start = Standard_True
638 Turn ( me : mutable ; Angle : PlaneAngle ;
639 Start : Boolean = Standard_True );
641 ---Purpose: Rotation of the view point around the current axis an
642 -- angular value in RADIANS relative to the initial
643 -- position expressed by Start = Standard_True
645 SetTwist ( me : mutable ; Angle : PlaneAngle )
647 ---Purpose: Defines the angular position of the high point of
648 -- the reference frame of the view with respect to the
649 -- Y screen axis with an absolute angular value in
651 raises BadValue from V3d;
652 -- If the eye, view point, or high point are aligned or confused.
654 SetEye( me : mutable ; X,Y,Z : Coordinate )
656 ---Purpose: Defines the position of the eye..
657 raises BadValue from V3d ;
658 -- If the eye, view point, or high point are aligned or confused.
660 SetDepth( me : mutable ; Depth : Length )
662 ---Purpose: Defines the Depth of the eye from the view point
663 -- without update the projection .
664 raises BadValue from V3d ;
665 -- If the Depth is <= 0.
667 SetProj( me : mutable ; Vx,Vy,Vz : Parameter )
669 ---Purpose: Defines the orientation of the projection.
670 raises BadValue from V3d ;
671 -- If the eye, view point, or high point are aligned or confused.
673 SetProj( me : mutable ; Orientation : TypeOfOrientation )
675 ---Purpose: Defines the orientation of the projection .
676 raises BadValue from V3d ;
677 -- If the eye, view point, or high point are aligned or confused.
680 SetAt( me : mutable ; X,Y,Z : Coordinate )
682 ---Purpose: Defines the position of the view point.
683 raises BadValue from V3d ;
684 -- If the eye, view point, or high point are aligned or confused.
686 SetUp( me : mutable ; Vx,Vy,Vz : Parameter )
688 ---Purpose: Defines the orientation of the high point.
689 raises BadValue from V3d ;
690 -- If the eye, view point, or high point are aligned or confused.
692 SetUp( me : mutable ; Orientation : TypeOfOrientation )
694 ---Purpose: Defines the orientation(SO) of the high point.
695 raises BadValue from V3d ;
696 -- If the eye, view point, or high point are aligned or confused.
698 SetViewOrientationDefault( me : mutable );
700 ---Purpose: Saves the current state of the orientation of the view
701 -- which will be the return state at ResetViewOrientation.
703 ResetViewOrientation ( me : mutable );
705 ---Purpose: Resets the orientation of the view.
708 --------------------------------------------------------
709 ---Category: Methods to modify the Mapping of the view
710 --------------------------------------------------------
712 Panning (me : mutable;
713 theDXv : Real from Standard;
714 theDYv : Real from Standard;
715 theZoomFactor : Factor from Quantity = 1;
716 theToStart : Boolean = Standard_True);
718 ---Purpose: Translates the center of the view along "x" and "y" axes of
719 -- view projection. Can be used to perform interactive panning operation.
720 -- In that case the DXv, DXy parameters specify panning relative to the
721 -- point where the operation is started.
722 -- @param theDXv [in] the relative panning on "x" axis of view projection, in view space coordinates.
723 -- @param theDYv [in] the relative panning on "y" axis of view projection, in view space coordinates.
724 -- @param theZoomFactor [in] the zooming factor.
725 -- @param theToStart [in] pass TRUE when starting panning to remember view
726 -- state prior to panning for relative arguments. If panning is started,
727 -- passing {0, 0} for {theDXv, theDYv} will return view to initial state.
728 -- Performs update of view.
730 SetCenter (me : mutable; theXp, theYp : Integer from Standard)
732 ---Purpose: Relocates center of screen to the point, determined by
733 -- {Xp, Yp} pixel coordinates relative to the bottom-left corner of
734 -- screen. To calculate pixel coordinates for any point from world
735 -- coordinate space, it can be projected using "Project".
736 -- @param theXp [in] the x coordinate.
737 -- @param theYp [in] the y coordinate.
738 raises BadValue from V3d;
739 -- If one of the dimensions of the projection is NULL.
741 SetSize ( me : mutable; theSize : Length )
743 ---Purpose: Defines the view projection size in its maximum dimension,
744 -- keeping the inital height/width ratio unchanged.
745 raises BadValue from V3d;
746 -- If <theSize> is <= 0.0
748 SetZSize ( me : mutable ; Size : Length )
750 ---Purpose: Defines the Depth size of the view
751 -- Front Plane will be set to Size/2.
752 -- Back Plane will be set to -Size/2.
753 -- Any Object located Above the Front Plane or
754 -- behind the Back Plane will be Clipped .
755 -- NOTE than the XY Size of the View is NOT modified .
756 raises BadValue from V3d ;
757 -- If the size of the view is <= 0
759 SetZoom ( me : mutable ; Coef : Factor ; Start : Boolean = Standard_True )
761 ---Purpose: Zooms the view by a factor relative to the initial
762 -- value expressed by Start = Standard_True
764 raises BadValue from V3d ;
765 -- If the zoom coefficient is <= 0
767 SetScale ( me : mutable ; Coef : Factor )
769 ---Purpose: Zooms the view by a factor relative to the value
770 -- initialised by SetViewMappingDefault().
772 raises BadValue from V3d ;
773 -- If the zoom coefficient is <= 0
775 SetAxialScale ( me : mutable ; Sx, Sy, Sz : Real from Standard )
777 ---Purpose: Sets anisotropic (axial) scale factors <Sx>, <Sy>, <Sz> for view <me>.
778 -- Anisotropic scaling operation is performed through multiplying
779 -- the current view orientation matrix by a scaling matrix:
785 raises BadValue from V3d ;
786 -- If the one of factors <= 0
788 FitAll (me : mutable;
789 theMargin : Coefficient = 0.01;
790 theToUpdate : Boolean from Standard = Standard_True);
792 ---Purpose: Adjust view parameters to fit the displayed scene, respecting height / width ratio.
793 -- The Z clipping range (depth range) is fitted if AutoZFit flag is TRUE.
794 -- Throws program error exception if margin coefficient is < 0 or >= 1.
796 -- @param theMargin [in] the margin coefficient for view borders.
797 -- @param theToUpdate [in] flag to perform view update.
799 DepthFitAll( me : mutable ; Aspect : Coefficient = 0.01;
800 Margin : Coefficient = 0.01 );
802 ---Purpose: Adjusts the viewing volume so as not to clip the displayed objects by front and back
803 -- and back clipping planes. Also sets depth value automatically depending on the
804 -- calculated Z size and Aspect parameter.
805 -- NOTE than the original XY size of the view is NOT modified .
807 FitAll (me : mutable;
808 theMinXv : Real from Standard;
809 theMinYv : Real from Standard;
810 theMaxXv : Real from Standard;
811 theMaxYv : Real from Standard)
813 ---Purpose: Centers the defined projection window so that it occupies
814 -- the maximum space while respecting the initial
815 -- height/width ratio.
816 -- NOTE than the original Z size of the view is NOT modified .
817 raises BadValue from V3d;
818 -- If the defined projection window has zero size.
820 WindowFit (me : mutable; theMinXp, theMinYp, theMaxXp, theMaxYp : Integer)
822 ---Purpose: Centers the defined PIXEL window so that it occupies
823 -- the maximum space while respecting the initial height/width ratio.
824 -- NOTE than the original Z size of the view is NOT modified.
825 -- @param theMinXp [in] pixel coordinates of minimal corner on x screen axis.
826 -- @param theMinYp [in] pixel coordinates of minimal corner on y screen axis.
827 -- @param theMaxXp [in] pixel coordinates of maximal corner on x screen axis.
828 -- @param theMaxYp [in] pixel coordinates of maximal corner on y screen axis.
830 SetViewMappingDefault( me : mutable );
832 ---Purpose: Saves the current view mapping. This will be the
833 -- state returned from ResetViewmapping.
835 ResetViewMapping ( me : mutable );
837 ---Purpose: Resets the centering of the view.
840 Reset ( me : mutable; update : Boolean from Standard = Standard_True );
842 ---Purpose: Resets the centering and the orientation of the view
844 ---------------------------------------------------
845 ---Category: Inquire methods
846 ---------------------------------------------------
848 Convert( me ; Vp : Integer ) returns Length
850 ---Purpose : Converts the PIXEL value
851 -- to a value in the projection plane.
852 raises UnMapped from V3d;
853 -- If the view is not mapped on the window.
855 Convert( me ; Xp,Yp : Integer ; Xv,Yv : out Coordinate )
857 ---Purpose : Converts the point PIXEL into a point projected
858 -- in the reference frame of the projection plane.
859 raises UnMapped from V3d;
860 -- If the view is not mapped on the window.
862 Convert( me ; Vv : Length ) returns Integer
864 ---Purpose : Converts tha value of the projection plane into
866 raises UnMapped from V3d;
867 -- If the view is not mapped on the window.
869 Convert( me ; Xv,Yv : Coordinate ; Xp,Yp : out Integer )
871 ---Purpose : Converts the point defined in the reference frame
872 -- of the projection plane into a point PIXEL.
873 raises UnMapped from V3d;
874 -- If the view is not mapped on the window.
876 Convert( me ; Xp,Yp : Integer ; X,Y,Z : out Coordinate)
878 ---Purpose : Converts the projected point into a point
879 -- in the reference frame of the view corresponding
880 -- to the intersection with the projection plane
881 -- of the eye/view point vector.
882 raises UnMapped from V3d;
883 -- If the view is not mapped on the window.
885 ConvertWithProj( me ; Xp,Yp : Integer ; X,Y,Z : out Coordinate ; Vx,Vy,Vz : out Parameter)
887 ---Purpose : Converts the projected point into a point
888 -- in the reference frame of the view corresponding
889 -- to the intersection with the projection plane
890 -- of the eye/view point vector and returns the
891 -- projection ray for further computations.
892 raises UnMapped from V3d;
893 -- If the view is not mapped on the window.
895 ConvertToGrid( me ; Xp,Yp : Integer ; Xg,Yg,Zg : out Coordinate)
897 ---Purpose : Converts the projected point into the nearest grid point
898 -- in the reference frame of the view corresponding
899 -- to the intersection with the projection plane
900 -- of the eye/view point vector and display the grid marker.
901 -- Warning: When the grid is not active the result is identical to the above Convert() method.
903 -- 1) Enable the grid echo display
904 -- myViewer->SetGridEcho(Standard_True);
905 -- 2) When application receive a move event:
906 -- 2.1) Check if any object is detected
907 -- if( myInteractiveContext->MoveTo(x,y) == AIS_SOD_Nothing ) {
908 -- 2.2) Check if the grid is active
909 -- if( myViewer->Grid()->IsActive() ) {
910 -- 2.3) Display the grid echo and gets the grid point
911 -- myView->ConvertToGrid(x,y,X,Y,Z);
912 -- myView->Viewer()->ShowGridEcho (myView, Graphic3d_Vertex (X,Y,Z));
913 -- myView->RedrawImmediate();
914 -- 2.4) Else this is the standard case
915 -- } else myView->Convert(x,y,X,Y,Z);
916 raises UnMapped from V3d;
917 -- If the view is not mapped on the window.
919 ConvertToGrid( me ; X,Y,Z : Coordinate ; Xg,Yg,Zg : out Coordinate)
921 ---Purpose : Converts the point into the nearest grid point
922 -- and display the grid marker.
923 ---Warning: When the grid is not active the result is identical
924 -- to the previous point.
925 raises UnMapped from V3d;
926 -- If the view is not mapped on the window.
928 Convert( me ; X,Y,Z : Coordinate; Xp,Yp : out Integer) ;
930 ---Purpose : Projects the point defined in the reference frame of
931 -- the view into the projected point in the associated window.
933 -- RefToPix( me ; X,Y,Z : Coordinate; Xp,Yp : out Integer) ;
934 -- ---Purpose : Projects the point defined in the reference frame of
935 -- -- the view into the projected point in the associated window.
936 -- Obsolete : Use Convert(X,Y,Z,Xp,Yp);
938 -- PixToRef( me ; Xp,Yp : Integer; X,Y,Z : out Coordinate) ;
939 -- ---Purpose : Converts the projected point in the associated window of
940 -- -- the view into the point defined in the reference frame.
941 -- Obsolete : Use Convert(Xp,Yp,X,Y,Z);
943 Project( me ; X,Y,Z : Coordinate; Xp,Yp : out Coordinate) ;
945 ---Purpose : Converts the point defined in the user space of
946 -- the view to the projected view plane point at z 0.
948 BackgroundColor( me; Type : TypeOfColor ; V1, V2, V3 : out Parameter) ;
950 ---Purpose: Returns the Background color values of the view
951 -- depending of the color Type.
953 BackgroundColor( me ) returns Color from Quantity;
955 ---Purpose: Returns the Background color object of the view.
957 GradientBackgroundColors( me;
958 Color1 : out Color from Quantity;
959 Color2 : out Color from Quantity) ;
961 ---Purpose: Returns the gradient background colour objects of the view.
963 GradientBackground ( me ) returns GradientBackground from Aspect;
965 ---Purpose: Returns the gradient background of the view.
967 Scale ( me ) returns Factor ;
969 ---Purpose: Returns the current value of the zoom expressed with
970 -- respect to SetViewMappingDefault().
972 AxialScale ( me ; Sx, Sy, Sz : out Real from Standard ) ;
974 ---Purpose: Returns the current values of the anisotropic (axial) scale factors.
976 Size ( me; Width, Height : out Length );
978 ---Purpose: Returns the height and width of the view.
980 ZSize ( me ) returns Real ;
982 ---Purpose: Returns the Depth of the view .
984 Eye( me ; X,Y,Z : out Coordinate );
986 ---Purpose: Returns the position of the eye.
988 FocalReferencePoint (me ; X,Y,Z : out Coordinate );
990 ---Purpose: Returns the position of point which emanating the
993 ProjReferenceAxe( me ; Xpix,Ypix : Integer ;
994 XP,YP,ZP,VX,VY,VZ : out Coordinate );
996 ---Purpose: Returns the coordinate of the point (Xpix,Ypix)
997 -- in the view (XP,YP,ZP), and the projection vector of the
998 -- view passing by the point (for PerspectiveView).
1000 Depth( me ) returns Length ;
1002 ---Purpose: Returns the Distance between the Eye and View Point.
1004 Proj( me ; Vx,Vy,Vz : out Parameter );
1006 ---Purpose: Returns the projection vector.
1008 At( me ; X,Y,Z : out Coordinate );
1010 ---Purpose: Returns the position of the view point.
1012 Up( me ; Vx,Vy,Vz : out Parameter );
1014 ---Purpose: Returns the vector giving the position of the high point.
1016 Twist( me ) returns PlaneAngle ;
1018 ---Purpose: Returns in RADIANS the orientation of the view around
1019 -- the visual axis measured from the Y axis of the screen.
1021 ShadingModel ( me ) returns TypeOfShadingModel ;
1023 ---Purpose: Returns the current shading model.
1025 SurfaceDetail(me) returns TypeOfSurfaceDetail;
1027 -- purpose: returns the current SurfaceDetail mode
1029 TextureEnv(me) returns TextureEnv from Graphic3d;
1031 -- purpose: return the current environment texture used
1033 Visualization ( me ) returns TypeOfVisualization from V3d;
1035 ---Purpose: Returns the current visualisation mode.
1037 Antialiasing ( me ) returns Boolean;
1039 ---Purpose: Indicates if the antialiasing is active (True) or
1040 -- inactive (False).
1042 ZCueing ( me; Depth, Width : out Length ) returns Boolean ;
1044 ---Purpose: Returns activity and information on the Zcueing.
1045 -- <Depth> : Depth of plane.
1046 -- <Width> : Thickness around the plane.
1048 ZClipping ( me; Depth, Width : out Length ) returns TypeOfZclipping;
1050 ---Purpose: Returns current information on the ZClipping.
1051 -- <Depth> : Depth of plane.
1052 -- <Width> : Thickness around the plane.
1053 -- <TypeOfZclipping> : "BACK"
1058 IfMoreLights( me ) returns Boolean;
1060 ---Purpose: Returns True if One light more can be
1061 -- activated in this View.
1063 InitActiveLights(me: mutable);
1065 ---Purpose: initializes an iteration on the active Lights.
1067 MoreActiveLights (me) returns Boolean from Standard;
1069 ---Purpose: returns true if there are more active Light(s) to return.
1071 NextActiveLights (me: mutable);
1073 ---Purpose : Go to the next active Light
1074 -- (if there is not, ActiveLight will raise an exception)
1076 ActiveLight(me) returns Light from V3d;
1079 Viewer ( me ) returns Viewer from V3d;
1081 ---Purpose: Returns the viewer in which the view has been created.
1083 IfWindow ( me ) returns Boolean;
1085 ---Purpose: Returns True if MyView is associated with a window .
1087 Window ( me ) returns Window from Aspect
1089 ---Purpose: Returns the Aspect Window associated with the view.
1090 raises BadValue from V3d;
1091 -- If MyView is not associated with a window
1093 Type( me ) returns TypeOfView from V3d;
1095 ---Purpose: Returns the Type of the View
1098 theDXp : Integer from Standard;
1099 theDYp : Integer from Standard;
1100 theZoomFactor : Factor from Quantity = 1;
1101 theToStart : Boolean = Standard_True);
1103 ---Purpose: Translates the center of the view along "x" and "y" axes of
1104 -- view projection. Can be used to perform interactive panning operation.
1105 -- In that case the DXp, DXp parameters specify panning relative to the
1106 -- point where the operation is started.
1107 -- @param theDXp [in] the relative panning on "x" axis of view projection, in pixels.
1108 -- @param theDYp [in] the relative panning on "y" axis of view projection, in pixels.
1109 -- @param theZoomFactor [in] the zooming factor.
1110 -- @param theToStart [in] pass TRUE when starting panning to remember view
1111 -- state prior to panning for relative arguments. Passing 0 for relative
1112 -- panning parameter should return view panning to initial state.
1113 -- Performs update of view.
1116 theXp1 : Integer from Standard;
1117 theYp1 : Integer from Standard;
1118 theXp2 : Integer from Standard;
1119 theYp2 : Integer from Standard)
1122 ---Purpose: Zoom the view according to a zoom factor computed
1123 -- from the distance between the 2 mouse position.
1124 -- @param theXp1 [in] the x coordinate of first mouse position, in pixels.
1125 -- @param theYp1 [in] the y coordinate of first mouse position, in pixels.
1126 -- @param theXp2 [in] the x coordinate of second mouse position, in pixels.
1127 -- @param theYp2 [in] the y coordinate of second mouse position, in pixels.
1129 StartZoomAtPoint (me : mutable;
1130 theXp : Integer from Standard;
1131 theYp : Integer from Standard);
1133 ---Purpose: Defines starting point for ZoomAtPoint view operation.
1134 -- @param theXp [in] the x mouse coordinate, in pixels.
1135 -- @param theYp [in] the y mouse coordinate, in pixels.
1137 ZoomAtPoint(me : mutable;
1138 theMouseStartX : Integer from Standard;
1139 theMouseStartY : Integer from Standard;
1140 theMouseEndX : Integer from Standard;
1141 theMouseEndY : Integer from Standard);
1143 ---Purpose: Zooms the model at a pixel defined by the method StartZoomAtPoint().
1145 AxialScale ( me: mutable; Dx, Dy: Integer from Standard; Axis: TypeOfAxe from V3d );
1147 ---Purpose: Performs anisotropic scaling of <me> view along the given <Axis>.
1148 -- The scale factor is calculated on a basis of
1149 -- the mouse pointer displacement <Dx,Dy>.
1150 -- The calculated scale factor is then passed to SetAxialScale(Sx, Sy, Sz) method.
1152 StartRotation(me : mutable ; X,Y :Integer from Standard;
1153 zRotationThreshold: Ratio from Quantity = 0.0);
1155 ---Purpose: Begin the rotation of the view around the screen axis
1156 -- according to the mouse position <X,Y>.
1157 -- Warning: Enable rotation around the Z screen axis when <zRotationThreshold>
1158 -- factor is > 0 soon the distance from the start point and the center
1159 -- of the view is > (medium viewSize * <zRotationThreshold> ).
1160 -- Generally a value of 0.4 is usable to rotate around XY screen axis
1161 -- inside the circular threshold area and to rotate around Z screen axis
1162 -- outside this area.
1164 Rotation(me:mutable; X,Y :Integer from Standard);
1166 ---Purpose: Continues the rotation of the view
1167 -- with an angle computed from the last and new mouse position <X,Y>.
1169 FitAll ( me : mutable ; aWindow: Window from Aspect;
1170 Umin, Vmin, Umax, Vmax : Coordinate )
1173 ---Purpose: Change the scale factor and position of the view
1174 -- such as the bounding box <Umin, Vmin, Umax, Vmax> is contains
1178 -----------------------------------------
1179 ---Category: Private or Protected methods
1180 -----------------------------------------
1182 SetFocale( me : mutable ; Focale : Length )
1183 ---Purpose: Change View Plane Distance for Perspective Views
1184 raises TypeMismatch from Standard
1185 ---Purpose: Warning! raises TypeMismatch from Standard if the view
1186 -- is not a perspective view.
1189 Focale( me ) returns Length;
1190 ---Purpose: Returns the View Plane Distance for Perspective Views
1192 View ( me) returns View from Visual3d is static ;
1194 ---Purpose: Returns the associated Visual3d view.
1196 ScreenAxis( myclass ; Vpn,Vup : Dir from gp ;
1197 Xaxe,Yaxe,Zaxe : out Vector from Graphic3d )
1198 returns Boolean is private ;
1199 ---Purpose: Determines the screen axes in the reference
1200 -- framework of the view.
1203 TrsPoint( myclass ; V : Vertex from Graphic3d ;
1204 Matrix : Array2OfReal from TColStd )
1205 returns Vertex from Graphic3d is private ;
1206 ---Purpose: Transforms the Vertex V according to the matrice Matrix .
1208 ImmediateUpdate (me) is static protected;
1211 SetComputedMode ( me : mutable; aMode : Boolean from Standard )
1214 ---Purpose: Switches computed HLR mode in the view
1215 ---Category: Methods to modify the class definition
1218 returns Boolean from Standard
1221 ---Purpose: Returns the computed HLR mode state
1222 ---Category: Inquire methods
1224 MinMax ( me; Umin,Vmin, Umax,Vmax : out Coordinate ) returns Integer
1225 ---Purpose: Returns the objects number and the projection window
1226 -- of the objects contained in the view.
1229 MinMax ( me; Xmin,Ymin,Zmin, Xmax,Ymax,Zmax : out Coordinate )
1231 ---Purpose: Returns the objects number and the box encompassing
1232 -- the objects contained in the view
1235 Gravity ( me; X,Y,Z : out Coordinate )
1236 ---Purpose: Returns the Objects number and the gravity center
1237 -- of ALL viewable points in the view
1240 Init(me: mutable) is private;
1242 ---Category: for compatibility.
1244 WindowFitAll ( me : mutable ; Xmin, Ymin, Xmax, Ymax : Integer);
1245 ---Purpose: idem than WindowFit
1247 Compute ( me; AVertex : Vertex from Graphic3d )
1248 returns Vertex from Graphic3d
1251 ---Purpose: Returns a new vertex when the grid is activated.
1253 SetGrid ( me : mutable;
1254 aPlane: Ax3 from gp;
1255 aGrid : Grid from Aspect )
1258 ---Purpose: Defines or Updates the definition of the
1260 ---Category: Methods to modify the class definition
1262 SetGridGraphicValues ( me : mutable;
1263 aGrid : Grid from Aspect )
1266 ---Purpose: Defines or Updates the graphic definition of the
1268 ---Category: Methods to modify the class definition
1270 SetGridActivity ( me : mutable;
1271 aFlag : Boolean from Standard )
1274 ---Purpose: Defines or Updates the activity of the
1276 ---Category: Methods to modify the class definition
1279 theFile : CString from Standard;
1280 theBufferType : BufferType from Graphic3d = Graphic3d_BT_RGB )
1281 returns Boolean from Standard;
1283 ---Purpose: dump the full contents of the view at the same
1284 -- scale in the file <theFile>. The file name
1285 -- extension must be one of ".png",".bmp",".jpg",".gif".
1286 -- Returns FALSE when the dump has failed
1288 Print (me; hPrnDC: Handle from Aspect = 0;
1289 showDialog: Boolean = Standard_True;
1290 showBackground : Boolean = Standard_True;
1291 filename: CString = NULL;
1292 printAlgorithm : PrintAlgo from Aspect = Aspect_PA_STRETCH)
1293 returns Boolean from Standard is static;
1296 ---Purpose: print the contents of the view to printer with preview.
1297 -- <hPrnDC> : If you have already an PrinterDeviceContext (HDC),
1298 -- then you can pass it to the print routines.
1299 -- If you don't have an PrinterDeviceContext, then this parameter should
1301 -- <showDialog> : If hPrnDC == NULL, then you can force the print routines to
1302 -- open a Print Dialog box.
1303 -- If you want to do this, then set showDialog to TRUE
1304 -- If you don't want to see a dialog (only possible, if you have a hPrnDC
1305 -- or the dialog box was opened once before) then set <showDialog> to FALSE.
1306 -- <showBackground> : When set to FALSE then print the view without background color
1307 -- (background is white)
1308 -- else set to TRUE for printing with current background color.
1309 -- <filename>: If != NULL, then the view will be printed to a file.
1310 -- <printAlgorithm>: If you want to select the print algorithm, then you can
1311 -- specify one of existing algorithms: Aspect_PA_STRETCH, Aspect_PA_TILE.
1312 -- Returns Standard_True if the data is passed to the printer, otherwise
1313 -- Standard_False if the print operation failed. This might be related to
1314 -- insufficient memory or some internal errors. All this errors are
1315 -- indicated by the message boxes (on level of OpenGl_GraphicDriver).
1316 -- Warning: This function can reuse FBO assigned to the
1317 -- view on level of OpenGl_GraphicDriver; Please take it into account if
1318 -- you use it for your purposes;
1319 -- Warning: Works only under Windows.
1321 ToPixMap (me : mutable;
1322 theImage : in out PixMap from Image;
1323 theWidth : Integer from Standard;
1324 theHeight : Integer from Standard;
1325 theBufferType : BufferType from Graphic3d = Graphic3d_BT_RGB;
1326 theToKeepAspect : Boolean from Standard = Standard_True;
1327 theStereoOptions : StereoDumpOptions from V3d = V3d_SDO_MONO)
1328 returns Boolean from Standard;
1330 ---Purpose : Dumps the full contents of the view
1331 -- to a pixmap of pixel size <theWidth> * <theHeight> and
1332 -- buffer type <theBufferType>. If <theToKeepAspect> is true
1333 -- the aspect ratio of view will be kept if <theWidth> and <theHeight>
1334 -- define another ratio.
1335 -- Pixmap will be automatically (re)allocated when needed.
1336 -- When dumping stereographic camera - the corresponding
1337 -- middle-point monographic projection will be used for dumping by default.
1338 -- <theStereoOptions> flags are to be used for dumping then left or
1339 -- right eye projections.
1341 SetBackFacingModel ( me : mutable;
1342 aModel : TypeOfBackfacingModel from V3d = V3d_TOBM_AUTOMATIC)
1345 ---Purpose : Manages display of the back faces
1346 -- When <aModel> is TOBM_AUTOMATIC the object backfaces
1347 -- are displayed only for surface objects and
1348 -- never displayed for solid objects.
1349 -- this was the previous mode.
1350 -- <aModel> is TOBM_ALWAYS_DISPLAYED the object backfaces
1351 -- are always displayed both for surfaces or solids.
1352 -- <aModel> is TOBM_NEVER_DISPLAYED the object backfaces
1353 -- are never displayed.
1355 BackFacingModel ( me )
1356 returns TypeOfBackfacingModel from V3d
1359 ---Purpose : Returns current state of the back faces display
1361 EnableDepthTest( me; enable : Boolean from Standard = Standard_True )
1364 ---Purpose: turns on/off opengl depth testing
1366 IsDepthTestEnabled( me ) returns Boolean from Standard
1369 ---Purpose: returns the current state of the depth testing
1371 EnableGLLight( me; enable : Boolean from Standard = Standard_True )
1374 ---Purpose: turns on/off opengl lighting, currently used in triedron displaying
1376 IsGLLightEnabled( me ) returns Boolean from Standard
1379 ---Purpose: returns the current state of the gl lighting
1380 -- currently used in triedron displaying
1382 AddClipPlane (me : mutable; thePlane : ClipPlane from Graphic3d) is virtual;
1383 ---Purpose: Adds clip plane to the view. The composition of clip planes truncates the
1384 -- rendering space to convex volume. Number of supported clip planes can be consulted
1385 -- by PlaneLimit method of associated Visual3d_View. Please be aware that the planes
1386 -- which exceed the limit are ignored during rendering.
1387 -- @param thePlane [in] the clip plane to be added to view.
1389 RemoveClipPlane (me : mutable; thePlane : ClipPlane from Graphic3d) is virtual;
1390 ---Purpose: Removes clip plane from the view.
1391 -- @param thePlane [in] the clip plane to be removed from view.
1393 SetClipPlanes (me : mutable; thePlanes : SequenceOfHClipPlane from Graphic3d);
1394 ---Purpose: Sets sequence of clip planes to the view. The planes that have been set
1395 -- before are removed from the view. The composition of clip planes
1396 -- truncates the rendering space to convex volume. Number of supported
1397 -- clip planes can be consulted by PlaneLimit method of associated
1398 -- Visual3d_View. Please be aware that the planes which exceed the limit
1399 -- are ignored during rendering.
1400 -- @param thePlanes [in] the clip planes to set.
1402 GetClipPlanes (me) returns SequenceOfHClipPlane from Graphic3d;
1403 ---C++: return const&
1404 ---Purpose: Get clip planes.
1405 -- @return sequence clip planes that have been set for the view
1407 SetCamera (me : mutable; theCamera : Camera from Graphic3d) is static;
1409 ---Purpose: Change camera used by view.
1411 Camera (me) returns Camera from Graphic3d is static;
1413 ---C++: return const&
1414 ---Purpose: Returns camera object of the view.
1415 -- @return: handle to camera object, or NULL if 3D view does not use
1416 -- the camera approach.
1419 theCamera : Camera from Graphic3d;
1420 theBox : Box from Bnd;
1421 theMargin : Real from Standard;
1422 theResolution : Real from Standard = 0.0;
1423 theToEnlargeIfLine : Boolean from Standard = Standard_True)
1424 returns Boolean from Standard is protected;
1426 ---Purpose: Transform camera eye, center and scale to fit in the
1427 -- passed bounding box specified in WCS.
1428 -- @param theCamera [in] the camera.
1429 -- @param theBox [in] the bounding box.
1430 -- @param theMargin [in] the margin coefficient for view borders.
1431 -- @param theResolution [in] the minimum size of projection of
1432 -- bounding box in Xv or Yv direction when it considered to
1433 -- be a thin plane or point (without a volume).
1434 -- In this case only the center of camera is adjusted.
1435 -- @param theToEnlargeIfLine [in] if passed TRUE - in cases when the
1436 -- whole bounding box projected into thin line going along
1437 -- Z-axis of screen, the view plane is enlarged such that
1438 -- we see the whole line on rotation, otherwise only the
1439 -- center of camera is adjusted.
1440 -- @return TRUE if the fit all operation can be done.
1443 theCamera : Camera from Graphic3d;
1444 theSizeXv : Real from Standard;
1445 theSizeYv : Real from Standard) is protected;
1447 ---Purpose: Scales camera to fit the view frame of defined width and height
1448 -- keeping the aspect. For orthogonal camera the method changes scale,
1449 -- for perspective adjusts Eye location about the Center point.
1450 -- @param theSizeXv [in] size of viewport frame on "x" axis.
1451 -- @param theSizeYv [in] size of viewport frame on "y" axis.
1454 theCamera : Camera from Graphic3d;
1455 theDXv : Real from Standard;
1456 theDYv : Real from Standard) is protected;
1458 -- Purpose: Translates camera eye and center along the view plane.
1459 -- @param theCamera [in] the camera to translate.
1460 -- @param theDXv [in] the translation in "x" direction.
1461 -- @param theDYv [in] the translation in "y" direction.
1463 RenderingParams (me) returns RenderingParams from Graphic3d is static;
1464 ---C++: return const &
1466 ---Purpose: Returns current rendering parameters and effect settings.
1468 ChangeRenderingParams (me : mutable) returns RenderingParams from Graphic3d is static;
1471 ---Purpose: Returns reference to current rendering parameters and effect settings.
1473 IsCullingEnabled (me) returns Boolean from Standard is static;
1475 ---Purpose: @return flag value of objects culling mechanism
1477 SetFrustumCulling (me : mutable; theMode : Boolean from Standard) is static;
1479 ---Purpose: Turn on/off automatic culling of objects outside frustrum (ON by default)
1483 myOldMouseX : Real is protected;
1484 myOldMouseY : Real is protected;
1485 myCamStartOpUp : Dir from gp is protected;
1486 myCamStartOpEye : Pnt from gp is protected;
1487 myCamStartOpBnd : Real[6] is protected;
1488 myCamStartOpCenter : Pnt from gp is protected;
1489 myCamera : Camera from Graphic3d is protected;
1491 MyViewer : ViewerPointer from V3d ;
1492 MyActiveLights: ListOfTransient from V3d;
1494 MyView : View from Visual3d is protected ;
1495 MyViewContext : ContextView from Visual3d ;
1496 MyBackground: Background from Aspect ;
1497 MyGradientBackground: GradientBackground from Aspect ;
1498 MyDefaultViewAxis: Vector from Graphic3d ;
1499 MyDefaultViewPoint: Vertex from Graphic3d ;
1501 MyWindow: Window from Aspect;
1503 myActiveLightsIterator: ListIteratorOfListOfTransient from TColStd;
1505 sx,sy: Integer from Standard;
1506 rx,ry: Real from Standard;
1507 gx,gy,gz: Real from Standard;
1508 myComputedMode: Boolean from Standard;
1509 SwitchSetFront: Boolean from Standard;
1510 MyZoomAtPointX, MyZoomAtPointY : Integer from Standard;
1513 MyGrid : Grid from Aspect;
1514 MyPlane : Ax3 from gp;
1516 --MyColorScale : ColorScale from V3d;
1517 MyLayerMgr : LayerMgr from V3d;
1519 -- the transformation between XoY and the grid plane
1520 MyTrsf : Array2OfReal from TColStd;
1523 MyGridEchoStructure : Structure from Graphic3d;
1524 MyGridEchoGroup : Group from Graphic3d;
1526 myImmediateUpdate: Boolean from Standard is protected;
1528 myXscreenAxis : Vector from Graphic3d;
1529 myYscreenAxis : Vector from Graphic3d;
1530 myZscreenAxis : Vector from Graphic3d;
1531 myViewAxis : Vector from Graphic3d;
1532 myGravityReferencePoint : Vertex from Graphic3d;
1536 SetViewOn from class Viewer from V3d ( me : mutable ),
1537 SetViewOn from class Viewer from V3d ( me : mutable ; View : View from V3d ),
1538 SetViewOff from class Viewer from V3d ( me : mutable ),
1539 SetViewOff from class Viewer from V3d ( me : mutable ; View : View from V3d )