3 -- Created: Wed Jan 15 14:47:42 1992
5 -- Modified: FMN - 24/12/97 -> Suppression GEOMLITE
6 -- CQO - 24/12/97 -> BUC50037
7 -- stt:25-02-98; S3558: ajout IfManageStandardEvent
8 -- stt:08-04-98; suppr IfManageStandardEvent
9 -- CAL - 18/08/98 -> S3892. Ajout grilles 3d.
10 -- BGN - 16-09-98; Points d'entree du Triedre (S3819, Phase 1)
11 -- 22-09-98 ; BGN : S3989 (anciennement S3819)
12 -- TypeOfTriedron* from Aspect(et pas V3d)
13 -- CAL - 21/10/98 -> Speciale. Ajout methode Tumble.
14 -- 29-OCT-98 : DCB : Adding ScreenCopy () method.
15 -- GG - 10/11/99 : PRO19603 Adding Redraw( area ) method
16 -- GG - 15/12/99 : GER61351 Adding SetBackgroundColor()
17 -- and BackgroundColor() methods
18 -- GG - 24/01/00 : -> Remove internal PixToRef() method, use Convert()
20 -- -> Rename internal RefToPix() to Convert() method.
21 -- -> Add ConvertToGrid() methods,
22 -- the Compute() internal method become private.
23 -- -> Add SetProjModel() method.
24 -- EUG - 25/01/00 : G003
25 -- -> Add methods SetAnimationMode() and
27 -- -> Add methods SetComputedMode() and
29 -- Warning : SetDegenerateModeOn() and Off()
31 -- -> Add methods SetBackFacingModel() and
33 -- VKH - 15/11/99 : G004
34 -- -> Add method Dump()
36 -- -> Add Transparency() method
38 -- THA - 17/08/00 Thomas HARTL <t-hartl@muenchen.matra-dtv.fr>
39 -- -> Add Print method (works only under Windows).
42 -- -> Add IsActiveLight() & IsActivePlane() methods
44 -- -> Add ToPixMap() method
45 -- GG - RIC120302 Add NEW SetWindow method.
48 -- -> Add EnableDepthTest() & IsDepthTestEnabled().
49 -- VSV - 28/05/02: ZBUFFER mode of Trihedron
51 -- SAV - 23/12/02 -> Added methods to set background image
53 -- NKV - 23/07/07 -> Define custom projection and model view matrixes
55 -- NKV - 08/02/07 -> Add ConvertWithProj() method
57 ---Copyright: Matra Datavision 1992
60 deferred class View from V3d
62 ---Purpose: Defines the application object VIEW for the
63 -- VIEWER application.
64 -- The methods of this class allow the editing
65 -- and inquiring the parameters linked to the view.
66 -- (Projection,Mapping,Zclipping,DepthCueing,AntiAliasing
68 -- Warning: The default parameters are defined by the class
69 -- Viewer (Example : SetDefaultViewSize()).
70 -- Certain methods are mouse oriented, and it is
71 -- necessary to know the difference between the start and
72 -- the continuation of this gesture in putting the method
74 -- Example : Shifting the eye-view along the screen axes.
76 -- View->Move(10.,20.,0.,True) (Starting motion)
77 -- View->Move(15.,-5.,0.,False) (Next motion)
90 ColorScale from Aspect,
91 Array2OfReal from TColStd,
94 Structure from Graphic3d,
97 ListOfTransient from V3d,
98 ListIteratorOfListOfTransient from TColStd,
101 TypeOfOrientation from V3d,
102 TypeOfShadingModel from V3d,
103 TypeOfSurfaceDetail from V3d,
104 TextureEnv from Graphic3d,
105 TypeOfVisualization from V3d,
106 TypeOfZclipping from V3d,
107 TypeOfProjectionModel from V3d,
108 TypeOfBackfacingModel from V3d,
113 ViewMapping from Visual3d,
114 ViewOrientation from Visual3d,
115 ContextView from Visual3d,
116 Vector from Graphic3d,
117 Vertex from Graphic3d,
118 Plotter from Graphic3d,
121 TypeOfImage from Image,
122 Background from Aspect,
123 GradientBackground from Aspect,
124 PlotterDriver from PlotMgt,
125 TypeOfColor from Quantity,
126 NameOfColor from Quantity,
128 Length from Quantity,
129 PlaneAngle from Quantity,
130 Parameter from Quantity,
131 Factor from Quantity,
133 Coefficient from Quantity,
135 Array2OfReal from TColStd,
136 ViewerPointer from V3d,
137 TransientManager from Visual3d,
138 TypeOfTriedronEcho from Aspect,
139 TypeOfTriedronPosition from Aspect,
140 FormatOfSheetPaper from Aspect,
141 RenderingContext from Aspect,
142 GraphicCallbackProc from Aspect,
143 FillMethod from Aspect,
144 GradientFillMethod from Aspect,
146 AsciiString from TCollection,
147 ExtendedString from TCollection,
148 PrintAlgo from Aspect
152 BadValue from Viewer, TypeMismatch from Standard,
153 MultiplyDefined from Standard,UnMapped from V3d
157 Initialize ( VM : mutable Viewer; Type : TypeOfView from V3d = V3d_ORTHOGRAPHIC );
158 ---Purpose: Initialises the view.
160 Initialize ( VM : mutable Viewer ; V : View from V3d; Type : TypeOfView from V3d = V3d_ORTHOGRAPHIC );
161 ---Purpose: Initialises the view by copying.
163 --------------------------------------------------------
164 ---Category: Methods to modify the Status of the view
165 --------------------------------------------------------
167 SetWindow ( me : mutable ; IdWin : Window )
168 ---Purpose: Activates the view in the window specified and Map the
169 -- Window to the screen.
170 raises MultiplyDefined from Standard;
172 ---Purpose: Warning! raises MultiplyDefined from Standard
173 -- if the view is already activated in a window.
174 -- Warning: The view is centered and resized to preserve
175 -- the height/width ratio of the window.
177 SetWindow ( me : mutable ;
178 aWindow : Window from Aspect;
179 aContext : RenderingContext from Aspect;
180 aDisplayCB : GraphicCallbackProc from Aspect;
181 aClientData : Address from Standard
183 ---Purpose: Activates the view in the specified Window
184 -- If <aContext> is not NULL the graphic context is used
185 -- to draw something in this view.
186 -- Otherwise an internal graphic context is created.
187 -- If <aDisplayCB> is not NULL then a user display CB is
188 -- call at the end of the OCC graphic traversal and just
189 -- before the swap of buffers. The <aClientData> is pass
190 -- to this call back.
191 raises MultiplyDefined from Standard;
193 ---Purpose: Warning! raises MultiplyDefined from Standard
194 -- if the view is already activated in a window.
195 -- Warning: The view is centered and resized to preserve
196 -- the height/width ratio of the window.
198 SetMagnify (me: mutable; IdWin : Window;
199 aPreviousView : View from V3d;
200 x1 , y1 , x2 , y2: Integer from Standard)
205 ---Purpose: Destroys the view.
207 Update ( me ) is redefined static;
209 ---Purpose: Updates the display of the view.
210 -- Must be called to update the view
211 -- when the update mode is deferred (WAIT) .
215 ---Purpose: Redisplays the view even if there has not
216 -- been any modification.
217 -- Must be called if the view is shown.
218 -- (Ex: DeIconification ) .
220 Redraw ( me ;x,y,width,height: Integer from Standard);
222 ---Purpose: Redisplays the view area after esxposure.
223 -- [x,y] define the min xy area position
224 -- [width,height] the size of the area in pixel unit.
226 MustBeResized ( me : mutable )
228 ---Purpose: Must be called when the window supporting the
229 -- view changes size.
230 raises UnMapped from V3d;
231 ---Purpose: if the view is not mapped on a window.
232 -- Warning: The view is centered and resized to preserve
233 -- the height/width ratio of the window.
235 DoMapping ( me : mutable );
237 ---Purpose: Must be called when the window supporting the
238 -- view is mapped or unmapped.
240 IsEmpty ( me ) returns Boolean;
242 ---Purpose: Returns the status of the view regarding
243 -- the displayed structures inside
244 -- Returns True is The View is empty
248 ---Purpose: Updates the lights of the view. The view is redrawn.
250 --------------------------------------------------------
251 ---Category: Methods to modify the Attributes of the view
252 --------------------------------------------------------
254 SetBackgroundColor ( me : mutable ;
255 Type : TypeOfColor; V1, V2, V3 : Parameter );
257 ---Purpose: Defines the background colour of the view
259 -- the colour definition type,
260 -- and the three corresponding values.
262 SetBackgroundColor ( me : mutable ; Color : Color from Quantity );
264 ---Purpose: Defines the background colour of the view
266 -- the colour object.
268 SetBackgroundColor ( me : mutable ; Name : NameOfColor );
270 ---Purpose: Defines the background colour of the view
272 -- the colour name in the form Quantity_NOC_xxxx .
274 SetBgGradientColors ( me : mutable ;
275 Color1 : Color from Quantity;
276 Color2 : Color from Quantity;
277 FillStyle : GradientFillMethod from Aspect = Aspect_GFM_HOR;
278 update : Boolean from Standard = Standard_False );
280 ---Purpose: Defines the gradient background colours of the view
282 -- two colour objects,
283 -- and fill method (horizontal by default)
285 SetBgGradientColors ( me : mutable ;
286 Color1 : NameOfColor;
287 Color2 : NameOfColor;
288 FillStyle : GradientFillMethod from Aspect = Aspect_GFM_HOR;
289 update : Boolean from Standard = Standard_False );
291 ---Purpose: Defines the gradient background colours of the view
293 -- two colour names in the form Quantity_NOC_xxxx,
294 -- and fill method (horizontal by default)
296 SetBgGradientStyle( me : mutable ;
297 AMethod : GradientFillMethod from Aspect = Aspect_GFM_HOR;
298 update : Boolean from Standard = Standard_False);
300 ---Purpose: Defines the gradient background fill method of the view
302 SetBackgroundImage( me : mutable; FileName : CString from Standard;
303 FillStyle : FillMethod from Aspect = Aspect_FM_CENTERED;
304 update : Boolean from Standard = Standard_False );
306 ---Purpose: Defines the background texture of the view
308 --- texture image file name,
309 --- and fill method (centered by default)
311 SetBgImageStyle( me : mutable; FillStyle : FillMethod from Aspect;
312 update : Boolean from Standard = Standard_False );
314 ---Purpose: Defines the textured background fill method of the view
316 SetAxis ( me : mutable; X,Y,Z : Coordinate ;
317 Vx,Vy,Vz : Parameter )
319 ---Purpose: Definition of an axis from its origin and
321 -- This will be the current axis for rotations and movements.
322 raises BadValue from Viewer;
323 ---Purpose: Warning! raises BadValue from Viewer if the vector normal is NULL. .
325 SetShadingModel ( me : mutable; Model : TypeOfShadingModel );
327 ---Purpose: Defines the shading model for the
328 -- visualisation ZBUFFER mode.
329 -- Various models are available.
331 SetSurfaceDetail(me : mutable; SurfaceDetail : TypeOfSurfaceDetail);
333 ---Purpose: select the kind of rendering for texture mapping
334 -- no texture mapping by default
336 SetTextureEnv(me : mutable; ATexture : TextureEnv from Graphic3d);
338 ---Purpose: set the environment texture to use
339 -- no environment texture by default
341 SetVisualization ( me : mutable;
342 Mode : TypeOfVisualization from V3d );
344 ---Purpose: Defines the visualisation mode in the view.
346 SetAntialiasingOn ( me : mutable );
348 ---Purpose: Activates antialiasing in the view.
350 SetAntialiasingOff ( me : mutable );
352 ---Purpose: Desactivates antialiasing in the view.
354 SetZClippingDepth ( me : mutable; Depth : Length );
356 ---Purpose: Defines the depth of the medium clipping plane.
358 SetZClippingWidth ( me : mutable; Width : Length )
360 ---Purpose: Defines the thicknes around the medium clippling plane. .
361 raises BadValue from Viewer;
362 -- If the thickness is <= 0
364 SetZClippingType ( me : mutable; Type : TypeOfZclipping );
366 ---Purpose: Defines the type of ZClipping.
368 SetZCueingDepth ( me : mutable; Depth : Length );
370 ---Purpose: Defines the depth of the medium plane.
372 SetZCueingWidth ( me : mutable; Width : Length )
374 ---Purpose: Defines the thickness around the medium plane.
375 raises BadValue from Viewer;
376 -- If thickness is <= 0
378 SetZCueingOn ( me : mutable );
380 ---Purpose: Activates ZCueing in the view.
382 SetZCueingOff ( me : mutable );
384 ---Purpose: Desactivates ZCueing in the view.
386 SetLightOn( me : mutable ; MyLight : Light from V3d )
388 ---Purpose: Activates MyLight in the view.
389 raises BadValue from Viewer;
390 -- If No More Light can be activated in MyView .
392 SetLightOn( me : mutable )
394 ---Purpose: Activates all the lights defined in this view.
395 raises BadValue from Viewer;
396 -- If No More Light can be activated in MyView .
398 SetLightOff( me : mutable ; MyLight : Light from V3d );
400 ---Purpose: Desactivate MyLight in this view.
402 SetLightOff( me : mutable );
404 ---Purpose: Deactivate all the Lights defined in this view.
406 IsActiveLight( me ; aLight: Light from V3d )
407 returns Boolean from Standard;
409 ---Purpose: Returns TRUE when the light is active in this view.
411 SetTransparency( me : mutable ; AnActivity : Boolean = Standard_False);
413 ---Purpose: Activate/Deactivate the transparency in this view.
415 SetPlaneOn( me : mutable ; MyPlane : Plane from V3d )
417 ---Purpose: Activates the clipping plane in this view.
418 raises BadValue from Viewer ;
419 ---Purpose: If No More Plane can be activated in MyView .
421 SetPlaneOn( me : mutable )
423 ---Purpose: Activate all the clipping planes defined in
425 raises BadValue from Viewer;
426 ---Purpose: If No More Plane can be activated in MyView .
428 SetPlaneOff( me : mutable ; MyPlane : Plane from V3d );
430 ---Purpose: Desactivates the clipping plane defined
433 SetPlaneOff( me : mutable );
435 ---Purpose: Deactivate all clipping planes defined
438 IsActivePlane( me ; aPlane: Plane from V3d )
439 returns Boolean from Standard;
441 ---Purpose: Returns TRUE when the plane is active in this view.
443 ---------------------------------------------------
445 ---------------------------------------------------
447 ZBufferTriedronSetup ( me : mutable;
448 XColor : NameOfColor from Quantity = Quantity_NOC_RED;
449 YColor : NameOfColor from Quantity = Quantity_NOC_GREEN;
450 ZColor : NameOfColor from Quantity = Quantity_NOC_BLUE1;
451 SizeRatio : Real from Standard = 0.8;
452 AxisDiametr : Real from Standard = 0.05;
453 NbFacettes : Integer from Standard = 12)
456 ---Purpose: Customization of the ZBUFFER Triedron.
457 --- XColor,YColor,ZColor - colors of axis
458 --- SizeRatio - ratio of decreasing of the trihedron size when its phisical
459 --- position comes out of the view
460 --- AxisDiametr - diameter relatively to axis length
461 --- NbFacettes - number of facettes of cylinders and cones
463 TriedronDisplay ( me : mutable;
464 APosition : TypeOfTriedronPosition from Aspect = Aspect_TOTP_CENTER;
465 AColor : NameOfColor from Quantity = Quantity_NOC_WHITE ;
466 AScale : Real from Standard = 0.02;
467 AMode : TypeOfVisualization from V3d = V3d_WIREFRAME )
470 ---Purpose: Display of the Triedron.
471 --- Initialize position, color and length of Triedron axes.
472 --- The scale is a percent of the window width.
475 TriedronErase ( me : mutable )
478 ---Purpose: Erases the Triedron.
481 TriedronEcho ( me : mutable;
482 AType : TypeOfTriedronEcho from Aspect = Aspect_TOTE_NONE )
485 ---Purpose: Highlights the echo zone of the Triedron.
488 ---------------------------------
489 ---Category: Graduated trihedron
490 ---------------------------------
492 GetGraduatedTrihedron(me;
494 xname, yname, zname : out ExtendedString from TCollection;
496 xdrawname, ydrawname, zdrawname : out Boolean from Standard;
498 xdrawvalues, ydrawvalues, zdrawvalues : out Boolean from Standard;
500 drawgrid : out Boolean from Standard;
502 drawaxes : out Boolean from Standard;
503 -- Number of splits along axes --
504 nbx, nby, nbz : out Integer from Standard;
505 -- Offset for drawing values --
506 xoffset, yoffset, zoffset : out Integer from Standard;
507 -- Offset for drawing names of axes --
508 xaxisoffset, yaxisoffset, zaxisoffset : out Integer from Standard;
510 xdrawtickmarks, ydrawtickmarks, zdrawtickmarks : out Boolean from Standard;
511 -- Length of tickmarks --
512 xtickmarklength, ytickmarklength, ztickmarklength : out Integer from Standard;
514 gridcolor : out Color from Quantity;
515 -- Colors of axis names --
516 xnamecolor, ynamecolor, znamecolor : out Color from Quantity;
517 -- Colors of axis and values --
518 xcolor, ycolor, zcolor : out Color from Quantity;
519 -- Name of font for names of axes --
520 fontOfNames : out AsciiString from TCollection;
521 -- Style of names of axes --
522 styleOfNames : out FontAspect from OSD;
523 -- Size of names of axes --
524 sizeOfNames : out Integer from Standard;
525 -- Name of font for values --
526 fontOfValues : out AsciiString from TCollection;
527 -- Style of values --
528 styleOfValues : out FontAspect from OSD;
530 sizeOfValues : out Integer from Standard)
531 ---Purpose: Returns data of a graduated trihedron.
534 GraduatedTrihedronDisplay(me : mutable;
536 xname : ExtendedString from TCollection = "X";
537 yname : ExtendedString from TCollection = "Y";
538 zname : ExtendedString from TCollection = "Z";
540 xdrawname : Boolean from Standard = Standard_True;
541 ydrawname : Boolean from Standard = Standard_True;
542 zdrawname : Boolean from Standard = Standard_True;
544 xdrawvalues : Boolean from Standard = Standard_True;
545 ydrawvalues : Boolean from Standard = Standard_True;
546 zdrawvalues : Boolean from Standard = Standard_True;
548 drawgrid : Boolean from Standard = Standard_True;
550 drawaxes : Boolean from Standard = Standard_True;
551 -- Number of splits along axes --
552 nbx : Integer from Standard = 3;
553 nby : Integer from Standard = 3;
554 nbz : Integer from Standard = 3;
555 -- Offset for drawing values --
556 xoffset : Integer from Standard = 10;
557 yoffset : Integer from Standard = 10;
558 zoffset : Integer from Standard = 10;
559 -- Offset for drawing names of axes --
560 xaxisoffset : Integer from Standard = 30;
561 yaxisoffset : Integer from Standard = 30;
562 zaxisoffset : Integer from Standard = 30;
564 xdrawtickmarks : Boolean from Standard = Standard_True;
565 ydrawtickmarks : Boolean from Standard = Standard_True;
566 zdrawtickmarks : Boolean from Standard = Standard_True;
567 -- Length of tickmarks --
568 xtickmarklength : Integer from Standard = 10;
569 ytickmarklength : Integer from Standard = 10;
570 ztickmarklength : Integer from Standard = 10;
572 gridcolor : Color from Quantity = Quantity_NOC_WHITE;
574 xnamecolor : Color from Quantity = Quantity_NOC_RED;
576 ynamecolor : Color from Quantity = Quantity_NOC_GREEN;
578 znamecolor : Color from Quantity = Quantity_NOC_BLUE1;
579 -- X color of axis and values --
580 xcolor : Color from Quantity = Quantity_NOC_RED;
581 -- Y color of axis and values --
582 ycolor : Color from Quantity = Quantity_NOC_GREEN;
583 -- Z color of axis and values --
584 zcolor : Color from Quantity = Quantity_NOC_BLUE1;
585 -- Name of font for names of axes --
586 fontOfNames : AsciiString from TCollection = "Arial";
587 -- Style of names of axes --
588 styleOfNames : FontAspect from OSD = OSD_FA_Bold;
589 -- Size of names of axes --
590 sizeOfNames : Integer from Standard = 12;
591 -- Name of font for values --
592 fontOfValues : AsciiString from TCollection = "Arial";
593 -- Style of values --
594 styleOfValues : FontAspect from OSD = OSD_FA_Regular;
596 sizeOfValues : Integer from Standard = 12)
597 ---Purpose: Displays a graduated trihedron.
600 GraduatedTrihedronErase(me : mutable)
601 ---Purpose: Erases a graduated trihedron from the view.
604 ---------------------------------------------------
605 -- Color Scale methods
606 ---------------------------------------------------
608 SetLayerMgr(me : mutable; aMgr : LayerMgr from V3d);
610 ColorScaleDisplay(me : mutable);
612 ColorScaleErase(me : mutable);
614 ColorScaleIsDisplayed(me)
615 returns Boolean from Standard;
618 returns ColorScale from Aspect;
620 --------------------------------------------------------
621 ---Category: Methods to modify the Projection of the view
622 --------------------------------------------------------
624 SetFront(me: mutable);
626 ---Purpose: modify the Projection of the view perpendicularly to
627 -- the privileged plane of the viewer.
629 Rotate ( me : mutable ; Ax,Ay,Az : PlaneAngle ;
630 Start : Boolean = Standard_True )
632 ---Purpose: Rotates the eye about the coordinate system of
633 -- reference of the screen
634 -- for which the origin is the view point of the projection,
635 -- with a relative angular value in RADIANS with respect to
636 -- the initial position expressed by Start = Standard_True
637 raises BadValue from Viewer;
638 ---Purpose: Warning! raises BadValue from Viewer
639 -- If the eye, the view point, or the high point are
640 -- aligned or confused.
642 Rotate ( me : mutable ; Ax,Ay,Az : PlaneAngle ;
644 Start : Boolean = Standard_True )
646 ---Purpose: Rotates the eye about the coordinate system of
647 -- reference of the screen
648 -- for which the origin is Gravity point {X,Y,Z},
649 -- with a relative angular value in RADIANS with respect to
650 -- the initial position expressed by Start = Standard_True
651 raises BadValue from Viewer;
652 ---Purpose: If the eye, the view point, or the high point are
653 -- aligned or confused.
655 Rotate ( me : mutable ; Axe : TypeOfAxe ; Angle : PlaneAngle ;
657 Start : Boolean = Standard_True );
659 ---Purpose: Rotates the eye about one of the coordinate axes of
660 -- of the view for which the origin is the Gravity point{X,Y,Z}
661 -- with an relative angular value in RADIANS with
662 -- respect to the initial position expressed by
663 -- Start = Standard_True
665 Rotate ( me : mutable ; Axe : TypeOfAxe ; Angle : PlaneAngle ;
666 Start : Boolean = Standard_True ) ;
668 ---Purpose: Rotates the eye about one of the coordinate axes of
669 -- of the view for which the origin is the view point of the
670 -- projection with an relative angular value in RADIANS with
671 -- respect to the initial position expressed by
672 -- Start = Standard_True
674 Rotate ( me : mutable ; Angle : PlaneAngle ;
675 Start : Boolean = Standard_True );
677 ---Purpose: Rotates the eye around the current axis a relative
678 -- angular value in RADIANS with respect to the initial
679 -- position expressed by Start = Standard_True
681 Move ( me : mutable ; Dx,Dy,Dz : Length ;
682 Start : Boolean = Standard_True )
684 ---Purpose: Movement of the eye parallel to the coordinate system
685 -- of reference of the screen a distance relative to the
686 -- initial position expressed by Start = Standard_True.
687 raises BadValue from Viewer;
688 -- If the eye, the view point, or the high point are
689 -- aligned or confused.
691 Move ( me : mutable ; Axe : TypeOfAxe ; Length : Length ;
692 Start : Boolean = Standard_True )
694 ---Purpose: Movement of the eye parallel to one of the axes of the
695 -- coordinate system of reference of the view a distance
696 -- relative to the initial position expressed by
697 -- Start = Standard_True.
698 raises BadValue from Viewer;
699 -- If the eye, view point, or high point are aligned or confused.
701 Move ( me : mutable ; Length : Length ;
702 Start : Boolean = Standard_True )
704 ---Purpose: Movement of the eye parllel to the current axis
705 -- a distance relative to the initial position
706 -- expressed by Start = Standard_True
707 raises BadValue from Viewer;
708 -- If the eye, view point, or high point are aligned or confused.
710 Translate ( me : mutable ; Dx,Dy,Dz : Length ;
711 Start : Boolean = Standard_True )
713 ---Purpose: Movement of the ye and the view point parallel to the
714 -- frame of reference of the screen a distance relative
715 -- to the initial position expressed by
716 -- Start = Standard_True
717 raises BadValue from Viewer;
718 -- If the eye, view point, or high point are aligned or confused.
720 Translate ( me : mutable ; Axe : TypeOfAxe ; Length : Length ;
721 Start : Boolean = Standard_True );
723 ---Purpose: Movement of the eye and the view point parallel to one
724 -- of the axes of the fame of reference of the view a
725 -- distance relative to the initial position
726 -- expressed by Start = Standard_True
728 Translate ( me : mutable ; Length : Length ;
729 Start : Boolean = Standard_True );
731 ---Purpose: Movement of the eye and view point parallel to
732 -- the current axis a distance relative to the initial
733 -- position expressed by Start = Standard_True
735 Place (me: mutable; x,y: Integer from Standard;
736 aZoomFactor: Factor from Quantity = 1)
738 ---Purpose: places the point of the view corresponding
739 -- at the pixel position x,y at the center of the window
740 -- and updates the view.
743 Turn ( me : mutable ; Ax,Ay,Az : PlaneAngle ;
744 Start : Boolean = Standard_True )
746 ---Purpose: Rotation of the view point around the frame of reference
747 -- of the screen for which the origin is the eye of the
748 -- projection with a relative angular value in RADIANS
749 -- with respect to the initial position expressed by
750 -- Start = Standard_True
751 raises BadValue from Viewer;
752 -- If the eye, view point, or high point are aligned or confused.
754 Turn ( me : mutable ; Axe : TypeOfAxe ; Angle : PlaneAngle ;
755 Start : Boolean = Standard_True )
758 ---Purpose: Rotation of the view point around one of the axes of the
759 -- frame of reference of the view for which the origin is
760 -- the eye of the projection with an angular value in
761 -- RADIANS relative to the initial position expressed by
762 -- Start = Standard_True
764 Turn ( me : mutable ; Angle : PlaneAngle ;
765 Start : Boolean = Standard_True );
767 ---Purpose: Rotation of the view point around the current axis an
768 -- angular value in RADIANS relative to the initial
769 -- position expressed by Start = Standard_True
771 SetTwist ( me : mutable ; Angle : PlaneAngle )
773 ---Purpose: Defines the angular position of the high point of
774 -- the reference frame of the view with respect to the
775 -- Y screen axis with an absolute angular value in
777 raises BadValue from Viewer;
778 -- If the eye, view point, or high point are aligned or confused.
780 SetEye( me : mutable ; X,Y,Z : Coordinate )
782 ---Purpose: Defines the position of the eye..
783 raises BadValue from Viewer ;
784 -- If the eye, view point, or high point are aligned or confused.
786 SetDepth( me : mutable ; Depth : Length )
788 ---Purpose: Defines the Depth of the eye from the view point
789 -- without update the projection .
790 raises BadValue from Viewer ;
791 -- If the Depth is <= 0.
793 SetProj( me : mutable ; Vx,Vy,Vz : Parameter )
795 ---Purpose: Defines the orientation of the projection.
796 raises BadValue from Viewer ;
797 -- If the eye, view point, or high point are aligned or confused.
799 SetProj( me : mutable ; Orientation : TypeOfOrientation )
801 ---Purpose: Defines the orientation of the projection .
802 raises BadValue from Viewer ;
803 -- If the eye, view point, or high point are aligned or confused.
806 SetAt( me : mutable ; X,Y,Z : Coordinate )
808 ---Purpose: Defines the position of the view point.
809 raises BadValue from Viewer ;
810 -- If the eye, view point, or high point are aligned or confused.
812 SetUp( me : mutable ; Vx,Vy,Vz : Parameter )
814 ---Purpose: Defines the orientation of the high point.
815 raises BadValue from Viewer ;
816 -- If the eye, view point, or high point are aligned or confused.
818 SetUp( me : mutable ; Orientation : TypeOfOrientation )
820 ---Purpose: Defines the orientation(SO) of the high point.
821 raises BadValue from Viewer ;
822 -- If the eye, view point, or high point are aligned or confused.
824 SetViewOrientation ( me : mutable; VO : ViewOrientation from Visual3d );
826 ---Purpose: Modifies the orientation of the view.
828 SetViewOrientationDefault( me : mutable );
830 ---Purpose: Saves the current state of the orientation of the view
831 -- which will be the return state at ResetViewOrientation.
833 ResetViewOrientation ( me : mutable );
835 ---Purpose: Resets the orientation of the view.
838 --------------------------------------------------------
839 ---Category: Methods to modify the Mapping of the view
840 --------------------------------------------------------
842 Panning ( me : mutable ; Dx , Dy : Length ;
843 aZoomFactor : Factor from Quantity = 1;
844 Start : Boolean = Standard_True )
846 ---Purpose: translates the center of the view and zooms the view.
848 raises BadValue from Viewer ;
850 SetCenter ( me : mutable ; Xc , Yc : Coordinate )
852 ---Purpose: Defines the centre of the view.
854 raises BadValue from Viewer ;
855 -- If one of the dimensions of the projection is NULL.
857 SetCenter ( me : mutable ; X,Y: Integer from Standard)
859 ---Purpose: Defines the centre of the view from a pixel position.
861 raises BadValue from Viewer ;
862 -- If one of the dimensions of the projection is NULL.
864 SetSize ( me : mutable ; Size : Length )
866 ---Purpose: Defines the size of the view while preserving the
867 -- center and height/width ratio of the window supporting
869 -- NOTE than the Depth of the View is NOT modified .
870 raises BadValue from Viewer ;
871 -- If the size of the view is <= 0
873 SetZSize ( me : mutable ; Size : Length )
875 ---Purpose: Defines the Depth size of the view
876 -- Front Plane will be set to Size/2.
877 -- Back Plane will be set to -Size/2.
878 -- Any Object located Above the Front Plane or
879 -- behind the Back Plane will be Clipped .
880 -- NOTE than the XY Size of the View is NOT modified .
881 raises BadValue from Viewer ;
882 -- If the size of the view is <= 0
884 SetZoom ( me : mutable ; Coef : Factor ; Start : Boolean = Standard_True )
886 ---Purpose: Zooms the view by a factor relative to the initial
887 -- value expressed by Start = Standard_True
889 raises BadValue from Viewer ;
890 -- If the zoom coefficient is <= 0
892 SetScale ( me : mutable ; Coef : Factor )
894 ---Purpose: Zooms the view by a factor relative to the value
895 -- initialised by SetViewMappingDefault().
897 raises BadValue from Viewer ;
898 -- If the zoom coefficient is <= 0
900 SetAxialScale ( me : mutable ; Sx, Sy, Sz : Real from Standard )
902 ---Purpose: Sets anisotropic (axial) scale factors <Sx>, <Sy>, <Sz> for view <me>.
903 -- Anisotropic scaling operation is performed through multiplying
904 -- the current view orientation matrix by a scaling matrix:
910 raises BadValue from Viewer ;
911 -- If the one of factors <= 0
913 FitAll ( me : mutable ; Coef : Coefficient = 0.01;
914 FitZ: Boolean from Standard = Standard_False; update : Boolean from Standard = Standard_True )
916 ---Purpose: Automatic zoom/panning. Objects in the view are visualised
917 -- so as to occupy the maximum space while respecting the
918 -- margin coefficient and the initial height /width ratio.
919 -- NOTE than the original Z size of the view is NOT modified .
920 raises BadValue from Viewer ;
921 -- If the margin coefficient is <0 ou >= 1 or
924 ZFitAll ( me : mutable ; Coef : Coefficient = 1.0 )
926 ---Purpose: Automatic Depth Panning. Objects visible in the view are
927 -- visualised so as to occupy the maximum Z amount of space
928 -- while respecting the margin coefficient .
929 -- NOTE than the original XY size of the view is NOT modified .
930 raises BadValue from Viewer ;
931 -- If the margin coefficient is <0 ou or
932 -- If No Objects are displayed in the view
934 DepthFitAll( me : mutable ; Aspect : Coefficient = 0.01;
935 Margin : Coefficient = 0.01 );
937 ---Purpose: Adjusts the viewing volume so as not to clip the displayed objects by front and back
938 -- and back clipping planes. Also sets depth value automatically depending on the
939 -- calculated Z size and Aspect parameter.
940 -- NOTE than the original XY size of the view is NOT modified .
942 FitAll ( me : mutable ; Umin, Vmin, Umax, Vmax : Coordinate )
944 ---Purpose: Centres the defined projection window so that it occupies
945 -- the maximum space while respecting the initial
946 -- height/width ratio.
947 -- NOTE than the original Z size of the view is NOT modified .
948 raises BadValue from Viewer;
949 -- If the defined projection window has zero size.
952 WindowFit ( me : mutable ; Xmin, Ymin, Xmax, Ymax : Integer)
954 ---Purpose: Centres the defined PIXEL window so that it occupies
955 -- the maximum space while respecting the initial
956 -- height/width ratio.
957 -- NOTE than the original Z size of the view is NOT modified .
958 raises BadValue from Viewer
959 -- If the defined projection window has zero size.
962 SetViewingVolume ( me : mutable ; Left, Right, Bottom, Top, ZNear, ZFar : Real from Standard)
964 ---Purpose: Sets Z and XY size of the view according to given values
965 -- with respecting the initial view depth (eye position)
966 raises BadValue from Viewer;
967 -- If the ZNear<0, ZFar<0 or ZNear>=Zfar.
969 SetViewMapping ( me : mutable; VM : ViewMapping from Visual3d );
971 ---Purpose: Modifies the mapping of the view.
973 SetViewMappingDefault( me : mutable );
975 ---Purpose: Saves the current view mapping. This will be the
976 -- state returned from ResetViewmapping.
978 ResetViewMapping ( me : mutable );
980 ---Purpose: Resets the centring of the view.
983 Reset ( me : mutable; update : Boolean from Standard = Standard_True );
985 ---Purpose: Resets the centring and the orientation of the view
987 ---------------------------------------------------
988 ---Category: Inquire methods
989 ---------------------------------------------------
991 Convert( me ; Vp : Integer ) returns Length
993 ---Purpose : Converts the PIXEL value
994 -- to a value in the projection plane.
995 raises UnMapped from V3d;
996 -- If the view is not mapped on the window.
998 Convert( me ; Xp,Yp : Integer ; Xv,Yv : out Coordinate )
1000 ---Purpose : Converts the point PIXEL into a point projected
1001 -- in the reference frame of the projection plane.
1002 raises UnMapped from V3d;
1003 -- If the view is not mapped on the window.
1005 Convert( me ; Vv : Length ) returns Integer
1007 ---Purpose : Converts tha value of the projection plane into
1009 raises UnMapped from V3d;
1010 -- If the view is not mapped on the window.
1012 Convert( me ; Xv,Yv : Coordinate ; Xp,Yp : out Integer )
1014 ---Purpose : Converts the point defined in the reference frame
1015 -- of the projection plane into a point PIXEL.
1016 raises UnMapped from V3d;
1017 -- If the view is not mapped on the window.
1019 Convert( me ; Xp,Yp : Integer ; X,Y,Z : out Coordinate)
1021 ---Purpose : Converts the projected point into a point
1022 -- in the reference frame of the view corresponding
1023 -- to the intersection with the projection plane
1024 -- of the eye/view point vector.
1025 raises UnMapped from V3d;
1026 -- If the view is not mapped on the window.
1028 ConvertWithProj( me ; Xp,Yp : Integer ; X,Y,Z : out Coordinate ; Vx,Vy,Vz : out Parameter)
1030 ---Purpose : Converts the projected point into a point
1031 -- in the reference frame of the view corresponding
1032 -- to the intersection with the projection plane
1033 -- of the eye/view point vector and returns the
1034 -- projection ray for further computations.
1035 raises UnMapped from V3d;
1036 -- If the view is not mapped on the window.
1038 ConvertToGrid( me ; Xp,Yp : Integer ; Xg,Yg,Zg : out Coordinate)
1040 ---Purpose : Converts the projected point into the nearest grid point
1041 -- in the reference frame of the view corresponding
1042 -- to the intersection with the projection plane
1043 -- of the eye/view point vector and display the grid marker.
1044 -- Warning: When the grid is not active the result is identical
1045 -- to the above Convert() method.
1047 -- 1) Enable the grid echo display
1048 -- myViewer->SetGridEcho(Standard_True);
1049 -- 2) When application receive a move event :
1050 -- 2.1) Check if any object is detected
1051 -- if( myInteractiveContext->MoveTo(x,y) == AIS_SOD_Nothing ) {
1052 -- 2.2) Check if the grid is active
1053 -- if( myViewer->Grid()->IsActive() ) {
1054 -- 2.3) Display the grid echo and gets the grid point
1055 -- myView->ConvertToGrid(x,y,X,Y,Z);
1056 -- 2.4) Else this is the standard case
1057 -- } else myView->Convert(x,y,X,Y,Z);
1058 raises UnMapped from V3d;
1059 -- If the view is not mapped on the window.
1061 ConvertToGrid( me ; X,Y,Z : Coordinate ; Xg,Yg,Zg : out Coordinate)
1063 ---Purpose : Converts the point into the nearest grid point
1064 -- and display the grid marker.
1065 ---Warning: When the grid is not active the result is identical
1066 -- to the previous point.
1067 raises UnMapped from V3d;
1068 -- If the view is not mapped on the window.
1070 Convert( me ; X,Y,Z : Coordinate; Xp,Yp : out Integer) ;
1072 ---Purpose : Projects the point defined in the reference frame of
1073 -- the view into the projected point in the associated window.
1075 -- RefToPix( me ; X,Y,Z : Coordinate; Xp,Yp : out Integer) ;
1076 -- ---Purpose : Projects the point defined in the reference frame of
1077 -- -- the view into the projected point in the associated window.
1078 -- Obsolete : Use Convert(X,Y,Z,Xp,Yp);
1080 -- PixToRef( me ; Xp,Yp : Integer; X,Y,Z : out Coordinate) ;
1081 -- ---Purpose : Converts the projected point in the associated window of
1082 -- -- the view into the point defined in the reference frame.
1083 -- Obsolete : Use Convert(Xp,Yp,X,Y,Z);
1085 Project( me ; X,Y,Z : Coordinate; Xp,Yp : out Coordinate) ;
1087 ---Purpose : Converts the point defined in the user space of
1088 -- the view to the projected view plane point at z 0.
1090 BackgroundColor( me; Type : TypeOfColor ; V1, V2, V3 : out Parameter) ;
1092 ---Purpose: Returns the Background color values of the view
1093 -- depending of the color Type.
1095 BackgroundColor( me ) returns Color from Quantity;
1097 ---Purpose: Returns the Background color object of the view.
1099 GradientBackgroundColors( me;
1100 Color1 : out Color from Quantity;
1101 Color2 : out Color from Quantity) ;
1103 ---Purpose: Returns the gradient background colour objects of the view.
1105 GradientBackground ( me ) returns GradientBackground from Aspect;
1107 ---Purpose: Returns the gradient background of the view.
1109 Scale ( me ) returns Factor ;
1111 ---Purpose: Returns the current value of the zoom expressed with
1112 -- respect to SetViewMappingDefault().
1114 AxialScale ( me ; Sx, Sy, Sz : out Real from Standard ) ;
1116 ---Purpose: Returns the current values of the anisotropic (axial) scale factors.
1118 Center ( me; Xc,Yc : out Coordinate );
1120 ---Purpose: Returns the centre of the view.
1122 Size ( me; Width, Height : out Length );
1124 ---Purpose: Returns the height and width of the view.
1126 ZSize ( me ) returns Real ;
1128 ---Purpose: Returns the Depth of the view .
1130 Eye( me ; X,Y,Z : out Coordinate );
1132 ---Purpose: Returns the position of the eye.
1134 FocalReferencePoint (me ; X,Y,Z : out Coordinate );
1136 ---Purpose: Returns the position of point which emanating the
1139 ProjReferenceAxe( me ; Xpix,Ypix : Integer ;
1140 XP,YP,ZP,VX,VY,VZ : out Coordinate );
1142 ---Purpose: Returns the coordinate of the point (Xpix,Ypix)
1143 -- in the view (XP,YP,ZP), and the projection vector of the
1144 -- view passing by the point (for PerspectiveView).
1146 Depth( me ) returns Length ;
1148 ---Purpose: Returns the Distance between the Eye and View Point.
1150 Proj( me ; Vx,Vy,Vz : out Parameter );
1152 ---Purpose: Returns the projection vector.
1154 At( me ; X,Y,Z : out Coordinate );
1156 ---Purpose: Returns the position of the view point.
1158 Up( me ; Vx,Vy,Vz : out Parameter );
1160 ---Purpose: Returns the vector giving the position of the high point.
1162 Twist( me ) returns PlaneAngle ;
1164 ---Purpose: Returns in RADIANS the orientation of the view around
1165 -- the visual axis measured from the Y axis of the screen.
1167 ShadingModel ( me ) returns TypeOfShadingModel ;
1169 ---Purpose: Returns the current shading model.
1171 SurfaceDetail(me) returns TypeOfSurfaceDetail;
1173 -- purpose: returns the current SurfaceDetail mode
1175 TextureEnv(me) returns TextureEnv from Graphic3d;
1177 -- purpose: return the current environment texture used
1179 Transparency(me) returns Boolean from Standard;
1181 ---Purpose: Returns the transparency activity.
1183 Visualization ( me ) returns TypeOfVisualization from V3d;
1185 ---Purpose: Returns the current visualisation mode.
1187 Antialiasing ( me ) returns Boolean;
1189 ---Purpose: Indicates if the antialiasing is active (True) or
1190 -- inactive (False).
1192 ZCueing ( me; Depth, Width : out Length ) returns Boolean ;
1194 ---Purpose: Returns activity and information on the Zcueing.
1195 -- <Depth> : Depth of plane.
1196 -- <Width> : Thickness around the plane.
1198 ZClipping ( me; Depth, Width : out Length ) returns TypeOfZclipping;
1200 ---Purpose: Returns current information on the ZClipping.
1201 -- <Depth> : Depth of plane.
1202 -- <Width> : Thickness around the plane.
1203 -- <TypeOfZclipping> : "BACK"
1208 IfMoreLights( me ) returns Boolean;
1210 ---Purpose: Returns True if One light more can be
1211 -- activated in this View.
1213 InitActiveLights(me: mutable);
1215 ---Purpose: initializes an iteration on the active Lights.
1217 MoreActiveLights (me) returns Boolean from Standard;
1219 ---Purpose: returns true if there are more active Light(s) to return.
1221 NextActiveLights (me: mutable);
1223 ---Purpose : Go to the next active Light
1224 -- (if there is not, ActiveLight will raise an exception)
1226 ActiveLight(me) returns mutable Light from V3d;
1229 IfMorePlanes( me ) returns Boolean;
1231 ---Purpose: Returns True if One clipping plane more can be
1232 -- activated in this View.
1234 InitActivePlanes(me: mutable);
1236 ---Purpose: initializes an iteration on the active Planes.
1238 MoreActivePlanes (me) returns Boolean from Standard;
1240 ---Purpose: returns true if there are more active Plane(s) to return.
1242 NextActivePlanes (me: mutable);
1244 ---Purpose : Go to the next active Plane
1245 -- (if there is not, ActivePlane will raise an exception)
1247 ActivePlane(me) returns mutable Plane from V3d;
1250 Viewer ( me ) returns mutable Viewer from V3d;
1252 ---Purpose: Returns the viewer in which the view has been created.
1254 IfWindow ( me ) returns Boolean;
1256 ---Purpose: Returns True if MyView is associated with a window .
1258 Window ( me ) returns mutable Window from Aspect
1260 ---Purpose: Returns the Aspect Window associated with the view.
1261 raises BadValue from Viewer;
1262 -- If MyView is not associated with a window
1264 Type( me ) returns TypeOfView from V3d;
1266 ---Purpose: Returns the Type of the View
1268 Pan ( me : mutable; Dx, Dy: Integer from Standard;
1269 aZoomFactor: Factor from Quantity = 1);
1271 ---Purpose: translates the center of the view and zooms the view.
1272 -- and updates the view.
1274 Zoom ( me : mutable; X1 , Y1 , X2 , Y2 : Integer from Standard)
1277 ---Purpose: Zoom the view according to a zoom factor computed
1278 -- from the distance between the 2 mouse position <X1,Y1>,<X2,Y2>
1280 Zoom ( me: mutable; X,Y: Integer from Standard)
1283 ---Purpose: Zoom the view according to a zoom factor computed
1284 -- from the distance between the last and new mouse position <X,Y>
1286 StartZoomAtPoint(me : mutable;
1287 xpix, ypix : Integer from Standard);
1289 ---Purpose: Defines the point (pixel) of zooming (for the method ZoomAtPoint()).
1291 ZoomAtPoint(me : mutable;
1292 mouseStartX, mouseStartY, mouseEndX, mouseEndY : Integer from Standard);
1294 ---Purpose: Zooms the model at a pixel defined by the method StartZoomAtPoint().
1296 AxialScale ( me: mutable; Dx, Dy: Integer from Standard; Axis: TypeOfAxe from V3d );
1298 ---Purpose: Performs anisotropic scaling of <me> view along the given <Axis>.
1299 -- The scale factor is calculated on a basis of
1300 -- the mouse pointer displacement <Dx,Dy>.
1301 -- The calculated scale factor is then passed to SetAxialScale(Sx, Sy, Sz) method.
1303 StartRotation(me : mutable ; X,Y :Integer from Standard;
1304 zRotationThreshold: Ratio from Quantity = 0.0);
1306 ---Purpose: Begin the rotation of the view arround the screen axis
1307 -- according to the mouse position <X,Y>.
1308 -- Warning: Enable rotation around the Z screen axis when <zRotationThreshold>
1309 -- factor is > 0 soon the distance from the start point and the center
1310 -- of the view is > (medium viewSize * <zRotationThreshold> ).
1311 -- Generally a value of 0.4 is usable to rotate around XY screen axis
1312 -- inside the circular treshold area and to rotate around Z screen axis
1313 -- outside this area.
1315 Rotation(me:mutable; X,Y :Integer from Standard);
1317 ---Purpose: Continues the rotation of the view
1318 -- with an angle computed from the last and new mouse position <X,Y>.
1320 FitAll ( me : mutable ; aWindow: Window from Aspect;
1321 Umin, Vmin, Umax, Vmax : Coordinate )
1324 ---Purpose: Change the scale factor and position of the view
1325 -- such as the bounding box <Umin, Vmin, Umax, Vmax> is contains
1329 -----------------------------------------
1330 ---Category: Private or Protected methods
1331 -----------------------------------------
1333 SetFocale( me : mutable ; Focale : Length )
1334 ---Purpose: Change View Plane Distance for Perspective Views
1335 raises TypeMismatch from Standard
1336 ---Purpose: Warning! raises TypeMismatch from Standard if the view
1337 -- is not a perspective view.
1340 Focale( me ) returns Length;
1341 ---Purpose: Returns the View Plane Distance for Perspective Views
1343 View ( me) returns mutable View from Visual3d is static ;
1345 ---Purpose: Returns the associated Visual3d view.
1347 ViewMapping ( me ) returns ViewMapping from Visual3d is static;
1349 ---Purpose: Returns the current mapping of the view.
1351 ViewOrientation ( me ) returns ViewOrientation from Visual3d is static;
1353 ---Purpose: Returns the current orientation of the view.
1355 ScreenAxis( myclass ; Vpn,Vup : Vector from Graphic3d ;
1356 Xaxe,Yaxe,Zaxe : out Vector from Graphic3d )
1357 returns Boolean is private ;
1358 ---Purpose: Determines the screen axes in the reference
1359 -- framework of the view.
1361 InitMatrix ( myclass ; Matrix : out Array2OfReal from TColStd ) is private ;
1364 Left, Right : Array2OfReal from TColStd ;
1365 Matrix : out Array2OfReal from TColStd )
1366 returns Boolean from Standard is private ;
1368 RotAxis( myclass ; Vrp : Vertex from Graphic3d ;
1369 Axe : Vector from Graphic3d ; Angle : PlaneAngle ;
1370 Matrix : out Array2OfReal from TColStd ) is private ;
1371 ---Purpose: Determines the rotation matrice around an axis
1372 -- for a given angle.
1374 TrsPoint( myclass ; P : Vertex from Graphic3d ;
1375 Matrix : Array2OfReal from TColStd )
1376 returns Vertex from Graphic3d is private ;
1377 ---Purpose: Transforms the point P according to the matrice Matrix .
1379 TrsPoint( myclass ; V : Vector from Graphic3d ;
1380 Matrix : Array2OfReal from TColStd )
1381 returns Vector from Graphic3d is private ;
1382 ---Purpose: Transforms the vector V according to the matrice Matrix .
1384 -----------------------------------------
1385 ---Category: TransientManager methods
1386 -----------------------------------------
1388 TransientManagerBeginDraw(me; DoubleBuffer: Boolean = Standard_False;
1389 RetainMode : Boolean = Standard_False)
1391 ---Purpose: Begins any graphics in the view <aView>
1392 -- Redraw any structured graphics in the back buffer before
1393 -- if <DoubleBuffer> is TRUE.
1394 -- Restore the front buffer from the back before
1395 -- if <DoubleBuffer> is FALSE.
1396 -- if <RetainMode> is TRUE.
1397 -- the graphic managed itself exposure,resizing ...
1398 -- if <RetainMode> is FALSE.
1399 -- the application must managed itself exposure,resizing ...
1401 returns Boolean from Standard;
1403 TransientManagerClearDraw(me);
1405 ---Purpose: Clear all transient graphics in the view <aView>
1408 TransientManagerBeginAddDraw(me)
1410 ---Purpose: Begins any add graphics in the view <aView>
1411 -- Redraw any structured graphics in the back buffer before
1412 -- the application must managed itself exposure,resizing ...
1413 -- Warning: Returns TRUE if transient drawing is enabled in
1414 -- the associated view.
1415 -- Returns FALSE ,if nothing works because something
1416 -- is wrong for the transient principle :
1418 returns Boolean from Standard;
1420 ---------------------------------------------------
1421 -- Category: Methods to modify the class definition
1423 ---------------------------------------------------
1425 SetAnimationModeOn ( me : mutable )
1428 ---Purpose: Activates animation mode.
1429 -- When the animation mode is activated in the view,
1430 -- all Graphic3d_Structure are stored in a graphic object.
1431 ---Category: Methods to modify the class definition
1433 SetAnimationModeOff ( me : mutable )
1436 ---Purpose: Deactivates the animation mode.
1437 ---Category: Methods to modify the class definition
1439 AnimationModeIsOn ( me )
1440 returns Boolean from Standard
1443 ---Purpose: Returns the activity of the animation mode.
1444 ---Category: Inquire methods
1446 SetAnimationMode ( me : mutable;
1447 anAnimationFlag : Boolean from Standard = Standard_True;
1448 aDegenerationFlag : Boolean from Standard = Standard_False
1451 ---Purpose : Enable/Disable animation/degeneration mode
1452 ---Category : Methods to modify the class definition
1454 AnimationMode ( me; isDegenerate: out Boolean from Standard )
1455 returns Boolean from Standard
1458 ---Purpose : Returns the animation and degenerate status.
1459 ---Category: Inquire methods
1461 ---------------------------------------------------
1462 -- Category: Methods to modify the class definition
1464 ---------------------------------------------------
1466 SetDegenerateModeOn ( me : mutable )
1469 ---Purpose: Activates degenerate mode.
1470 -- When the degenerate mode is activated in the view,
1471 -- all Graphic3d_Structure with the type TOS_COMPUTED
1472 -- displayed in this view are not computed.
1473 -- Warning: Obsolete method , use SetComputedMode()
1474 ---Category: Methods to modify the class definition
1476 SetDegenerateModeOff ( me : mutable )
1479 ---Purpose: Deactivates the degenerate mode.
1480 -- Category: Methods to modify the class definition
1481 -- Warning: if the computed mode has been disabled in the
1482 -- viewer the mode will remain degenerated.
1483 -- Warning: Obsolete method , use SetComputedMode()
1485 DegenerateModeIsOn ( me )
1486 returns Boolean from Standard
1489 ---Purpose: Returns the activity of the degenerate mode.
1490 ---Category: Inquire methods
1492 SetComputedMode ( me : mutable; aMode : Boolean from Standard )
1495 ---Purpose: Switches computed HLR mode in the view
1496 ---Category: Methods to modify the class definition
1499 returns Boolean from Standard
1502 ---Purpose: Returns the computed HLR mode state
1503 ---Category: Inquire methods
1505 MinMax ( me; Umin,Vmin, Umax,Vmax : out Coordinate ) returns Integer
1506 ---Purpose: Returns the objects number and the projection window
1507 -- of the objects contained in the view.
1510 MinMax ( me; Xmin,Ymin,Zmin, Xmax,Ymax,Zmax : out Coordinate )
1512 ---Purpose: Returns the objects number and the box encompassing
1513 -- the objects contained in the view
1516 Gravity ( me; X,Y,Z : out Coordinate ) returns Integer
1517 ---Purpose: Returns the Objects number and the gravity center
1518 -- of ALL viewable points in the view
1521 Init(me: mutable) is private;
1523 ---Category: for compatibility.
1525 WindowFitAll ( me : mutable ; Xmin, Ymin, Xmax, Ymax : Integer);
1526 ---Purpose: idem than WindowFit
1528 SetPlotter ( me : mutable; aPlotter : Plotter from Graphic3d )
1529 ---Purpose: Set a plotter for plotting the contents of the view
1533 Plot ( me : mutable )
1534 ---Purpose: Create a 2D View for plotting the contents of the view
1535 raises BadValue from Viewer;
1536 -- if the plotter is undefined.
1538 Compute ( me; AVertex : Vertex from Graphic3d )
1539 returns Vertex from Graphic3d
1542 ---Purpose: Returns a new vertex when the grid is activated.
1544 SetGrid ( me : mutable;
1545 aPlane: Ax3 from gp;
1546 aGrid : Grid from Aspect )
1549 ---Purpose: Defines or Updates the definition of the
1551 ---Category: Methods to modify the class definition
1553 SetGridGraphicValues ( me : mutable;
1554 aGrid : Grid from Aspect )
1557 ---Purpose: Defines or Updates the graphic definition of the
1559 ---Category: Methods to modify the class definition
1561 SetGridActivity ( me : mutable;
1562 aFlag : Boolean from Standard )
1565 ---Purpose: Defines or Updates the activity of the
1567 ---Category: Methods to modify the class definition
1569 Tumble ( me : mutable;
1570 NbImages : Integer from Standard = 314;
1571 AnimationMode : Boolean from Standard = Standard_False )
1572 returns Real from Standard
1575 ---Purpose: Animates the view <me>
1576 -- Returns the number of images per second
1577 -- if <AnimationMode> is Standard_True, the animation mode
1580 ScreenCopy (me : mutable;
1581 aPlotterDriver : PlotterDriver from PlotMgt;
1582 fWhiteBackground : Boolean from Standard = Standard_True;
1583 aScale : Factor from Quantity = 1.0
1585 ---Purpose: dump the view
1588 theFile: CString from Standard;
1589 theBufferType : TypeOfImage from Image = Image_TOI_RGB )
1590 returns Boolean from Standard;
1592 ---Purpose: dump the full contents of the view at the same
1593 -- scale in the file <theFile>. The file name
1594 -- extension must be one of ".png",".bmp",".jpg",".gif".
1595 -- Returns FALSE when the dump has failed
1598 theFile : CString from Standard;
1599 theFormat : FormatOfSheetPaper from Aspect;
1600 theBufferType : TypeOfImage from Image = Image_TOI_RGB )
1601 returns Boolean from Standard;
1603 ---Purpose: dump the full contents of the view with a
1604 -- different scale according to the required sheet
1605 -- paper size (format) and the ratio
1606 -- width/height of the view.
1607 -- and returns FALSE when the dump has failed
1608 -- Warning : the file name extension must be one of
1609 -- ".png",".bmp",".jpg",".gif"
1610 -- but make becarefull about the time to dump and
1611 -- resulting file size especially for the A0 format.
1612 -- NOTE that you can use after any standard system utility
1613 -- for editing or sending the image file to a laser printer.
1614 -- (i.e: Microsoft Photo Editor on Windows system
1615 -- or Image Viewer on SUN system)
1617 Print (me; hPrnDC: Handle from Aspect = NULL;
1618 showDialog: Boolean = Standard_True;
1619 showBackground : Boolean = Standard_True;
1620 filename: CString = NULL;
1621 printAlgorithm : PrintAlgo from Aspect = Aspect_PA_STRETCH)
1622 returns Boolean from Standard is static;
1625 ---Purpose: print the contents of the view to printer with preview.
1626 -- <hPrnDC> : If you have already an PrinterDeviceContext (HDC),
1627 -- then you can pass it to the print routines.
1628 -- If you don't have an PrinterDeviceContext, then this parameter should
1630 -- <showDialog> : If hPrnDC == NULL, then you can force the print routines to
1631 -- open a Print Dialog box.
1632 -- If you want to do this, then set showDialog to TRUE
1633 -- If you don't want to see a dialog (only possible, if you have a hPrnDC
1634 -- or the dialog box was opened once before) then set <showDialog> to FALSE.
1635 -- <showBackground> : When set to FALSE then print the view without background color
1636 -- (background is white)
1637 -- else set to TRUE for printing with current background color.
1638 -- <filename>: If != NULL, then the view will be printed to a file.
1639 -- <printAlgorithm>: If you want to select the print algorithm, then you can
1640 -- specify one of existing algorithms: Aspect_PA_STRETCH, Aspect_PA_TILE.
1641 -- Returns Standard_True if the data is passed to the printer, otherwise
1642 -- Standard_False if the print operation failed. This might be related to
1643 -- insufficient memory or some internal errors. All this errors are
1644 -- indicated by the message boxes (on level of OpenGl_GraphicDriver).
1645 -- Warning: This function can reuse FBO assigned to the
1646 -- view on level of OpenGl_GraphicDriver; Please take it into account if
1647 -- you use it for your purposes;
1648 -- Warning: Works only under Windows.
1650 ToPixMap ( me : mutable;
1651 theWidth : Integer from Standard;
1652 theHeight : Integer from Standard;
1653 theBufferType : TypeOfImage from Image = Image_TOI_RGB;
1654 theForceCentered : Boolean from Standard = Standard_True )
1655 returns PixMap from Image;
1657 ---Purpose : dump the full contents of the view
1658 -- to a pixmap of pixel size <theWidth>*<theHeight> and
1659 -- buffer type <theBufferType>. If <theForceCentered> is true
1660 -- view scene will be centered.
1662 SetProjModel( me : mutable;
1663 amOdel: TypeOfProjectionModel from V3d = V3d_TPM_SCREEN )
1666 ---Purpose : Manages projection model
1669 returns TypeOfProjectionModel from V3d
1672 ---Purpose : Returns the current projection model
1674 SetBackFacingModel ( me : mutable;
1675 aModel : TypeOfBackfacingModel from V3d = V3d_TOBM_AUTOMATIC)
1678 ---Purpose : Manages display of the back faces
1679 -- When <aModel> is TOBM_AUTOMATIC the object backfaces
1680 -- are displayed only for surface objects and
1681 -- never displayed for solid objects.
1682 -- this was the previous mode.
1683 -- <aModel> is TOBM_ALWAYS_DISPLAYED the object backfaces
1684 -- are always displayed both for surfaces or solids.
1685 -- <aModel> is TOBM_NEVER_DISPLAYED the object backfaces
1686 -- are never displayed.
1688 BackFacingModel ( me )
1689 returns TypeOfBackfacingModel from V3d
1692 ---Purpose : Returns current state of the back faces display
1694 EnableDepthTest( me; enable : Boolean from Standard = Standard_True )
1697 ---Purpose: turns on/off opengl depth testing
1699 IsDepthTestEnabled( me ) returns Boolean from Standard
1702 ---Purpose: returns the current state of the depth testing
1704 EnableGLLight( me; enable : Boolean from Standard = Standard_True )
1707 ---Purpose: turns on/off opengl lighting, currently used in triedron displaying
1709 IsGLLightEnabled( me ) returns Boolean from Standard
1712 ---Purpose: returns the current state of the gl lighting
1713 -- currently used in triedron displaying
1718 MyType : TypeOfView from V3d is protected ;
1719 MyViewer : ViewerPointer from V3d ;
1720 MyActiveLights: ListOfTransient from V3d;
1721 MyActivePlanes: ListOfTransient from V3d;
1723 MyView : View from Visual3d is protected ;
1724 MyViewMapping : ViewMapping from Visual3d is protected ;
1725 MyViewOrientation : ViewOrientation from Visual3d ;
1726 MyViewContext : ContextView from Visual3d ;
1727 MyBackground: Background from Aspect ;
1728 MyGradientBackground: GradientBackground from Aspect ;
1729 MyDefaultViewAxis: Vector from Graphic3d ;
1730 MyDefaultViewPoint: Vertex from Graphic3d ;
1732 MyWindow: Window from Aspect;
1734 MyPlotter: Plotter from Graphic3d;
1736 myActiveLightsIterator: ListIteratorOfListOfTransient from TColStd;
1737 myActivePlanesIterator: ListIteratorOfListOfTransient from TColStd;
1739 sx,sy: Integer from Standard;
1740 rx,ry: Real from Standard;
1741 gx,gy,gz: Real from Standard;
1742 myComputedMode: Boolean from Standard;
1743 SwitchSetFront: Boolean from Standard;
1744 MyZoomAtPointX, MyZoomAtPointY : Integer from Standard;
1747 MyGrid : Grid from Aspect;
1748 MyPlane : Ax3 from gp;
1750 --MyColorScale : ColorScale from V3d;
1751 MyLayerMgr : LayerMgr from V3d;
1753 -- the transformation between XoY and the grid plane
1754 MyTrsf : Array2OfReal from TColStd;
1757 MyGridEchoStructure : Structure from Graphic3d;
1758 MyGridEchoGroup : Group from Graphic3d;
1760 MyProjModel : TypeOfProjectionModel from V3d is protected;
1761 MyAnimationFlags : Integer from Standard;
1763 MyTransparencyFlag : Boolean from Standard;
1766 SetViewOn from class Viewer from V3d ( me : mutable ),
1767 SetViewOn from class Viewer from V3d ( me : mutable ; View : View from V3d ),
1768 SetViewOff from class Viewer from V3d ( me : mutable ),
1769 SetViewOff from class Viewer from V3d ( me : mutable ; View : View from V3d )