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 -- the colour objects.
284 SetBgGradientColors ( me : mutable ;
285 Color1 : NameOfColor;
286 Color2 : NameOfColor;
287 FillStyle : GradientFillMethod from Aspect = Aspect_GFM_HOR;
288 update : Boolean from Standard = Standard_False );
290 ---Purpose: Defines the gradient background colours of the view
292 -- the colour names in the form Quantity_NOC_xxxx .
294 SetBgGradientStyle( me ;
295 AMethod : GradientFillMethod from Aspect = Aspect_GFM_HOR;
296 update : Boolean from Standard = Standard_False);
298 ---Purpose: Defines the gradient background fill method of the view
300 SetBackgroundImage( me : mutable; FileName : CString from Standard;
301 FillStyle : FillMethod from Aspect = Aspect_FM_CENTERED;
302 update : Boolean from Standard = Standard_False );
304 SetBgImageStyle( me : mutable; FillStyle : FillMethod from Aspect;
305 update : Boolean from Standard = Standard_False );
307 SetAxis ( me : mutable; X,Y,Z : Coordinate ;
308 Vx,Vy,Vz : Parameter )
310 ---Purpose: Definition of an axis from its origin and
312 -- This will be the current axis for rotations and movements.
313 raises BadValue from Viewer;
314 ---Purpose: Warning! raises BadValue from Viewer if the vector normal is NULL. .
316 SetShadingModel ( me : mutable; Model : TypeOfShadingModel );
318 ---Purpose: Defines the shading model for the
319 -- visualisation ZBUFFER mode.
320 -- Various models are available.
322 SetSurfaceDetail(me : mutable; SurfaceDetail : TypeOfSurfaceDetail);
324 ---Purpose: select the kind of rendering for texture mapping
325 -- no texture mapping by default
327 SetTextureEnv(me : mutable; ATexture : TextureEnv from Graphic3d);
329 ---Purpose: set the environment texture to use
330 -- no environment texture by default
332 SetVisualization ( me : mutable;
333 Mode : TypeOfVisualization from V3d );
335 ---Purpose: Defines the visualisation mode in the view.
337 SetAntialiasingOn ( me : mutable );
339 ---Purpose: Activates antialiasing in the view.
341 SetAntialiasingOff ( me : mutable );
343 ---Purpose: Desactivates antialiasing in the view.
345 SetZClippingDepth ( me : mutable; Depth : Length );
347 ---Purpose: Defines the depth of the medium clipping plane.
349 SetZClippingWidth ( me : mutable; Width : Length )
351 ---Purpose: Defines the thicknes around the medium clippling plane. .
352 raises BadValue from Viewer;
353 -- If the thickness is <= 0
355 SetZClippingType ( me : mutable; Type : TypeOfZclipping );
357 ---Purpose: Defines the type of ZClipping.
359 SetZCueingDepth ( me : mutable; Depth : Length );
361 ---Purpose: Defines the depth of the medium plane.
363 SetZCueingWidth ( me : mutable; Width : Length )
365 ---Purpose: Defines the thickness around the medium plane.
366 raises BadValue from Viewer;
367 -- If thickness is <= 0
369 SetZCueingOn ( me : mutable );
371 ---Purpose: Activates ZCueing in the view.
373 SetZCueingOff ( me : mutable );
375 ---Purpose: Desactivates ZCueing in the view.
377 SetLightOn( me : mutable ; MyLight : Light from V3d )
379 ---Purpose: Activates MyLight in the view.
380 raises BadValue from Viewer;
381 -- If No More Light can be activated in MyView .
383 SetLightOn( me : mutable )
385 ---Purpose: Activates all the lights defined in this view.
386 raises BadValue from Viewer;
387 -- If No More Light can be activated in MyView .
389 SetLightOff( me : mutable ; MyLight : Light from V3d );
391 ---Purpose: Desactivate MyLight in this view.
393 SetLightOff( me : mutable );
395 ---Purpose: Deactivate all the Lights defined in this view.
397 IsActiveLight( me ; aLight: Light from V3d )
398 returns Boolean from Standard;
400 ---Purpose: Returns TRUE when the light is active in this view.
402 SetTransparency( me : mutable ; AnActivity : Boolean = Standard_False);
404 ---Purpose: Activate/Deactivate the transparency in this view.
406 SetPlaneOn( me : mutable ; MyPlane : Plane from V3d )
408 ---Purpose: Activates the clipping plane in this view.
409 raises BadValue from Viewer ;
410 ---Purpose: If No More Plane can be activated in MyView .
412 SetPlaneOn( me : mutable )
414 ---Purpose: Activate all the clipping planes defined in
416 raises BadValue from Viewer;
417 ---Purpose: If No More Plane can be activated in MyView .
419 SetPlaneOff( me : mutable ; MyPlane : Plane from V3d );
421 ---Purpose: Desactivates the clipping plane defined
424 SetPlaneOff( me : mutable );
426 ---Purpose: Deactivate all clipping planes defined
429 IsActivePlane( me ; aPlane: Plane from V3d )
430 returns Boolean from Standard;
432 ---Purpose: Returns TRUE when the plane is active in this view.
434 ---------------------------------------------------
436 ---------------------------------------------------
438 ZBufferTriedronSetup ( me : mutable;
439 XColor : NameOfColor from Quantity = Quantity_NOC_RED;
440 YColor : NameOfColor from Quantity = Quantity_NOC_GREEN;
441 ZColor : NameOfColor from Quantity = Quantity_NOC_BLUE1;
442 SizeRatio : Real from Standard = 0.8;
443 AxisDiametr : Real from Standard = 0.05;
444 NbFacettes : Integer from Standard = 12)
447 ---Purpose: Customization of the ZBUFFER Triedron.
448 --- XColor,YColor,ZColor - colors of axis
449 --- SizeRatio - ratio of decreasing of the trihedron size when its phisical
450 --- position comes out of the view
451 --- AxisDiametr - diameter relatively to axis length
452 --- NbFacettes - number of facettes of cylinders and cones
454 TriedronDisplay ( me : mutable;
455 APosition : TypeOfTriedronPosition from Aspect = Aspect_TOTP_CENTER;
456 AColor : NameOfColor from Quantity = Quantity_NOC_WHITE ;
457 AScale : Real from Standard = 0.02;
458 AMode : TypeOfVisualization from V3d = V3d_WIREFRAME )
461 ---Purpose: Display of the Triedron.
462 --- Initialize position, color and length of Triedron axes.
463 --- The scale is a percent of the window width.
466 TriedronErase ( me : mutable )
469 ---Purpose: Erases the Triedron.
472 TriedronEcho ( me : mutable;
473 AType : TypeOfTriedronEcho from Aspect = Aspect_TOTE_NONE )
476 ---Purpose: Highlights the echo zone of the Triedron.
479 ---------------------------------
480 ---Category: Graduated trihedron
481 ---------------------------------
483 GetGraduatedTrihedron(me;
485 xname, yname, zname : out ExtendedString from TCollection;
487 xdrawname, ydrawname, zdrawname : out Boolean from Standard;
489 xdrawvalues, ydrawvalues, zdrawvalues : out Boolean from Standard;
491 drawgrid : out Boolean from Standard;
493 drawaxes : out Boolean from Standard;
494 -- Number of splits along axes --
495 nbx, nby, nbz : out Integer from Standard;
496 -- Offset for drawing values --
497 xoffset, yoffset, zoffset : out Integer from Standard;
498 -- Offset for drawing names of axes --
499 xaxisoffset, yaxisoffset, zaxisoffset : out Integer from Standard;
501 xdrawtickmarks, ydrawtickmarks, zdrawtickmarks : out Boolean from Standard;
502 -- Length of tickmarks --
503 xtickmarklength, ytickmarklength, ztickmarklength : out Integer from Standard;
505 gridcolor : out Color from Quantity;
506 -- Colors of axis names --
507 xnamecolor, ynamecolor, znamecolor : out Color from Quantity;
508 -- Colors of axis and values --
509 xcolor, ycolor, zcolor : out Color from Quantity;
510 -- Name of font for names of axes --
511 fontOfNames : out AsciiString from TCollection;
512 -- Style of names of axes --
513 styleOfNames : out FontAspect from OSD;
514 -- Size of names of axes --
515 sizeOfNames : out Integer from Standard;
516 -- Name of font for values --
517 fontOfValues : out AsciiString from TCollection;
518 -- Style of values --
519 styleOfValues : out FontAspect from OSD;
521 sizeOfValues : out Integer from Standard)
522 ---Purpose: Returns data of a graduated trihedron.
525 GraduatedTrihedronDisplay(me : mutable;
527 xname : ExtendedString from TCollection = "X";
528 yname : ExtendedString from TCollection = "Y";
529 zname : ExtendedString from TCollection = "Z";
531 xdrawname : Boolean from Standard = Standard_True;
532 ydrawname : Boolean from Standard = Standard_True;
533 zdrawname : Boolean from Standard = Standard_True;
535 xdrawvalues : Boolean from Standard = Standard_True;
536 ydrawvalues : Boolean from Standard = Standard_True;
537 zdrawvalues : Boolean from Standard = Standard_True;
539 drawgrid : Boolean from Standard = Standard_True;
541 drawaxes : Boolean from Standard = Standard_True;
542 -- Number of splits along axes --
543 nbx : Integer from Standard = 3;
544 nby : Integer from Standard = 3;
545 nbz : Integer from Standard = 3;
546 -- Offset for drawing values --
547 xoffset : Integer from Standard = 10;
548 yoffset : Integer from Standard = 10;
549 zoffset : Integer from Standard = 10;
550 -- Offset for drawing names of axes --
551 xaxisoffset : Integer from Standard = 30;
552 yaxisoffset : Integer from Standard = 30;
553 zaxisoffset : Integer from Standard = 30;
555 xdrawtickmarks : Boolean from Standard = Standard_True;
556 ydrawtickmarks : Boolean from Standard = Standard_True;
557 zdrawtickmarks : Boolean from Standard = Standard_True;
558 -- Length of tickmarks --
559 xtickmarklength : Integer from Standard = 10;
560 ytickmarklength : Integer from Standard = 10;
561 ztickmarklength : Integer from Standard = 10;
563 gridcolor : Color from Quantity = Quantity_NOC_WHITE;
565 xnamecolor : Color from Quantity = Quantity_NOC_RED;
567 ynamecolor : Color from Quantity = Quantity_NOC_GREEN;
569 znamecolor : Color from Quantity = Quantity_NOC_BLUE1;
570 -- X color of axis and values --
571 xcolor : Color from Quantity = Quantity_NOC_RED;
572 -- Y color of axis and values --
573 ycolor : Color from Quantity = Quantity_NOC_GREEN;
574 -- Z color of axis and values --
575 zcolor : Color from Quantity = Quantity_NOC_BLUE1;
576 -- Name of font for names of axes --
577 fontOfNames : AsciiString from TCollection = "Arial";
578 -- Style of names of axes --
579 styleOfNames : FontAspect from OSD = OSD_FA_Bold;
580 -- Size of names of axes --
581 sizeOfNames : Integer from Standard = 12;
582 -- Name of font for values --
583 fontOfValues : AsciiString from TCollection = "Arial";
584 -- Style of values --
585 styleOfValues : FontAspect from OSD = OSD_FA_Regular;
587 sizeOfValues : Integer from Standard = 12)
588 ---Purpose: Displays a graduated trihedron.
591 GraduatedTrihedronErase(me : mutable)
592 ---Purpose: Erases a graduated trihedron from the view.
595 ---------------------------------------------------
596 -- Color Scale methods
597 ---------------------------------------------------
599 SetLayerMgr(me : mutable; aMgr : LayerMgr from V3d);
601 ColorScaleDisplay(me : mutable);
603 ColorScaleErase(me : mutable);
605 ColorScaleIsDisplayed(me)
606 returns Boolean from Standard;
609 returns ColorScale from Aspect;
611 --------------------------------------------------------
612 ---Category: Methods to modify the Projection of the view
613 --------------------------------------------------------
615 SetFront(me: mutable);
617 ---Purpose: modify the Projection of the view perpendicularly to
618 -- the privileged plane of the viewer.
620 Rotate ( me : mutable ; Ax,Ay,Az : PlaneAngle ;
621 Start : Boolean = Standard_True )
623 ---Purpose: Rotates the eye about the coordinate system of
624 -- reference of the screen
625 -- for which the origin is the view point of the projection,
626 -- with a relative angular value in RADIANS with respect to
627 -- the initial position expressed by Start = Standard_True
628 raises BadValue from Viewer;
629 ---Purpose: Warning! raises BadValue from Viewer
630 -- If the eye, the view point, or the high point are
631 -- aligned or confused.
633 Rotate ( me : mutable ; Ax,Ay,Az : PlaneAngle ;
635 Start : Boolean = Standard_True )
637 ---Purpose: Rotates the eye about the coordinate system of
638 -- reference of the screen
639 -- for which the origin is Gravity point {X,Y,Z},
640 -- with a relative angular value in RADIANS with respect to
641 -- the initial position expressed by Start = Standard_True
642 raises BadValue from Viewer;
643 ---Purpose: If the eye, the view point, or the high point are
644 -- aligned or confused.
646 Rotate ( me : mutable ; Axe : TypeOfAxe ; Angle : PlaneAngle ;
648 Start : Boolean = Standard_True );
650 ---Purpose: Rotates the eye about one of the coordinate axes of
651 -- of the view for which the origin is the Gravity point{X,Y,Z}
652 -- with an relative angular value in RADIANS with
653 -- respect to the initial position expressed by
654 -- Start = Standard_True
656 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 view point of the
661 -- projection with an relative angular value in RADIANS with
662 -- respect to the initial position expressed by
663 -- Start = Standard_True
665 Rotate ( me : mutable ; Angle : PlaneAngle ;
666 Start : Boolean = Standard_True );
668 ---Purpose: Rotates the eye around the current axis a relative
669 -- angular value in RADIANS with respect to the initial
670 -- position expressed by Start = Standard_True
672 Move ( me : mutable ; Dx,Dy,Dz : Length ;
673 Start : Boolean = Standard_True )
675 ---Purpose: Movement of the eye parallel to the coordinate system
676 -- of reference of the screen a distance relative to the
677 -- initial position expressed by Start = Standard_True.
678 raises BadValue from Viewer;
679 -- If the eye, the view point, or the high point are
680 -- aligned or confused.
682 Move ( me : mutable ; Axe : TypeOfAxe ; Length : Length ;
683 Start : Boolean = Standard_True )
685 ---Purpose: Movement of the eye parallel to one of the axes of the
686 -- coordinate system of reference of the view a distance
687 -- relative to the initial position expressed by
688 -- Start = Standard_True.
689 raises BadValue from Viewer;
690 -- If the eye, view point, or high point are aligned or confused.
692 Move ( me : mutable ; Length : Length ;
693 Start : Boolean = Standard_True )
695 ---Purpose: Movement of the eye parllel to the current axis
696 -- a distance relative to the initial position
697 -- expressed by Start = Standard_True
698 raises BadValue from Viewer;
699 -- If the eye, view point, or high point are aligned or confused.
701 Translate ( me : mutable ; Dx,Dy,Dz : Length ;
702 Start : Boolean = Standard_True )
704 ---Purpose: Movement of the ye and the view point parallel to the
705 -- frame of reference of the screen a distance relative
706 -- to the initial position expressed by
707 -- Start = Standard_True
708 raises BadValue from Viewer;
709 -- If the eye, view point, or high point are aligned or confused.
711 Translate ( me : mutable ; Axe : TypeOfAxe ; Length : Length ;
712 Start : Boolean = Standard_True );
714 ---Purpose: Movement of the eye and the view point parallel to one
715 -- of the axes of the fame of reference of the view a
716 -- distance relative to the initial position
717 -- expressed by Start = Standard_True
719 Translate ( me : mutable ; Length : Length ;
720 Start : Boolean = Standard_True );
722 ---Purpose: Movement of the eye and view point parallel to
723 -- the current axis a distance relative to the initial
724 -- position expressed by Start = Standard_True
726 Place (me: mutable; x,y: Integer from Standard;
727 aZoomFactor: Factor from Quantity = 1)
729 ---Purpose: places the point of the view corresponding
730 -- at the pixel position x,y at the center of the window
731 -- and updates the view.
734 Turn ( me : mutable ; Ax,Ay,Az : PlaneAngle ;
735 Start : Boolean = Standard_True )
737 ---Purpose: Rotation of the view point around the frame of reference
738 -- of the screen for which the origin is the eye of the
739 -- projection with a relative angular value in RADIANS
740 -- with respect to the initial position expressed by
741 -- Start = Standard_True
742 raises BadValue from Viewer;
743 -- If the eye, view point, or high point are aligned or confused.
745 Turn ( me : mutable ; Axe : TypeOfAxe ; Angle : PlaneAngle ;
746 Start : Boolean = Standard_True )
749 ---Purpose: Rotation of the view point around one of the axes of the
750 -- frame of reference of the view for which the origin is
751 -- the eye of the projection with an angular value in
752 -- RADIANS relative to the initial position expressed by
753 -- Start = Standard_True
755 Turn ( me : mutable ; Angle : PlaneAngle ;
756 Start : Boolean = Standard_True );
758 ---Purpose: Rotation of the view point around the current axis an
759 -- angular value in RADIANS relative to the initial
760 -- position expressed by Start = Standard_True
762 SetTwist ( me : mutable ; Angle : PlaneAngle )
764 ---Purpose: Defines the angular position of the high point of
765 -- the reference frame of the view with respect to the
766 -- Y screen axis with an absolute angular value in
768 raises BadValue from Viewer;
769 -- If the eye, view point, or high point are aligned or confused.
771 SetEye( me : mutable ; X,Y,Z : Coordinate )
773 ---Purpose: Defines the position of the eye..
774 raises BadValue from Viewer ;
775 -- If the eye, view point, or high point are aligned or confused.
777 SetDepth( me : mutable ; Depth : Length )
779 ---Purpose: Defines the Depth of the eye from the view point
780 -- without update the projection .
781 raises BadValue from Viewer ;
782 -- If the Depth is <= 0.
784 SetProj( me : mutable ; Vx,Vy,Vz : Parameter )
786 ---Purpose: Defines the orientation of the projection.
787 raises BadValue from Viewer ;
788 -- If the eye, view point, or high point are aligned or confused.
790 SetProj( me : mutable ; Orientation : TypeOfOrientation )
792 ---Purpose: Defines the orientation of the projection .
793 raises BadValue from Viewer ;
794 -- If the eye, view point, or high point are aligned or confused.
797 SetAt( me : mutable ; X,Y,Z : Coordinate )
799 ---Purpose: Defines the position of the view point.
800 raises BadValue from Viewer ;
801 -- If the eye, view point, or high point are aligned or confused.
803 SetUp( me : mutable ; Vx,Vy,Vz : Parameter )
805 ---Purpose: Defines the orientation of the high point.
806 raises BadValue from Viewer ;
807 -- If the eye, view point, or high point are aligned or confused.
809 SetUp( me : mutable ; Orientation : TypeOfOrientation )
811 ---Purpose: Defines the orientation(SO) of the high point.
812 raises BadValue from Viewer ;
813 -- If the eye, view point, or high point are aligned or confused.
815 SetViewOrientation ( me : mutable; VO : ViewOrientation from Visual3d );
817 ---Purpose: Modifies the orientation of the view.
819 SetViewOrientationDefault( me : mutable );
821 ---Purpose: Saves the current state of the orientation of the view
822 -- which will be the return state at ResetViewOrientation.
824 ResetViewOrientation ( me : mutable );
826 ---Purpose: Resets the orientation of the view.
829 --------------------------------------------------------
830 ---Category: Methods to modify the Mapping of the view
831 --------------------------------------------------------
833 Panning ( me : mutable ; Dx , Dy : Length ;
834 aZoomFactor : Factor from Quantity = 1;
835 Start : Boolean = Standard_True )
837 ---Purpose: translates the center of the view and zooms the view.
839 raises BadValue from Viewer ;
841 SetCenter ( me : mutable ; Xc , Yc : Coordinate )
843 ---Purpose: Defines the centre of the view.
845 raises BadValue from Viewer ;
846 -- If one of the dimensions of the projection is NULL.
848 SetCenter ( me : mutable ; X,Y: Integer from Standard)
850 ---Purpose: Defines the centre of the view from a pixel position.
852 raises BadValue from Viewer ;
853 -- If one of the dimensions of the projection is NULL.
855 SetSize ( me : mutable ; Size : Length )
857 ---Purpose: Defines the size of the view while preserving the
858 -- center and height/width ratio of the window supporting
860 -- NOTE than the Depth of the View is NOT modified .
861 raises BadValue from Viewer ;
862 -- If the size of the view is <= 0
864 SetZSize ( me : mutable ; Size : Length )
866 ---Purpose: Defines the Depth size of the view
867 -- Front Plane will be set to Size/2.
868 -- Back Plane will be set to -Size/2.
869 -- Any Object located Above the Front Plane or
870 -- behind the Back Plane will be Clipped .
871 -- NOTE than the XY Size of the View is NOT modified .
872 raises BadValue from Viewer ;
873 -- If the size of the view is <= 0
875 SetZoom ( me : mutable ; Coef : Factor ; Start : Boolean = Standard_True )
877 ---Purpose: Zooms the view by a factor relative to the initial
878 -- value expressed by Start = Standard_True
880 raises BadValue from Viewer ;
881 -- If the zoom coefficient is <= 0
883 SetScale ( me : mutable ; Coef : Factor )
885 ---Purpose: Zooms the view by a factor relative to the value
886 -- initialised by SetViewMappingDefault().
888 raises BadValue from Viewer ;
889 -- If the zoom coefficient is <= 0
891 SetAxialScale ( me : mutable ; Sx, Sy, Sz : Real from Standard )
893 ---Purpose: Sets anisotropic (axial) scale factors <Sx>, <Sy>, <Sz> for view <me>.
894 -- Anisotropic scaling operation is performed through multiplying
895 -- the current view orientation matrix by a scaling matrix:
901 raises BadValue from Viewer ;
902 -- If the one of factors <= 0
904 FitAll ( me : mutable ; Coef : Coefficient = 0.01;
905 FitZ: Boolean from Standard = Standard_False; update : Boolean from Standard = Standard_True )
907 ---Purpose: Automatic zoom/panning. Objects in the view are visualised
908 -- so as to occupy the maximum space while respecting the
909 -- margin coefficient and the initial height /width ratio.
910 -- NOTE than the original Z size of the view is NOT modified .
911 raises BadValue from Viewer ;
912 -- If the margin coefficient is <0 ou >= 1 or
915 ZFitAll ( me : mutable ; Coef : Coefficient = 1.0 )
917 ---Purpose: Automatic Depth Panning. Objects visible in the view are
918 -- visualised so as to occupy the maximum Z amount of space
919 -- while respecting the margin coefficient .
920 -- NOTE than the original XY size of the view is NOT modified .
921 raises BadValue from Viewer ;
922 -- If the margin coefficient is <0 ou or
923 -- If No Objects are displayed in the view
925 DepthFitAll( me : mutable ; Aspect : Coefficient = 0.01;
926 Margin : Coefficient = 0.01 );
928 ---Purpose: Adjusts the viewing volume so as not to clip the displayed objects by front and back
929 -- and back clipping planes. Also sets depth value automatically depending on the
930 -- calculated Z size and Aspect parameter.
931 -- NOTE than the original XY size of the view is NOT modified .
933 FitAll ( me : mutable ; Umin, Vmin, Umax, Vmax : Coordinate )
935 ---Purpose: Centres the defined projection window so that it occupies
936 -- the maximum space while respecting the initial
937 -- height/width ratio.
938 -- NOTE than the original Z size of the view is NOT modified .
939 raises BadValue from Viewer;
940 -- If the defined projection window has zero size.
943 WindowFit ( me : mutable ; Xmin, Ymin, Xmax, Ymax : Integer)
945 ---Purpose: Centres the defined PIXEL window so that it occupies
946 -- the maximum space while respecting the initial
947 -- height/width ratio.
948 -- NOTE than the original Z size of the view is NOT modified .
949 raises BadValue from Viewer
950 -- If the defined projection window has zero size.
953 SetViewingVolume ( me : mutable ; Left, Right, Bottom, Top, ZNear, ZFar : Real from Standard)
955 ---Purpose: Sets Z and XY size of the view according to given values
956 -- with respecting the initial view depth (eye position)
957 raises BadValue from Viewer;
958 -- If the ZNear<0, ZFar<0 or ZNear>=Zfar.
960 SetViewMapping ( me : mutable; VM : ViewMapping from Visual3d );
962 ---Purpose: Modifies the mapping of the view.
964 SetViewMappingDefault( me : mutable );
966 ---Purpose: Saves the current view mapping. This will be the
967 -- state returned from ResetViewmapping.
969 ResetViewMapping ( me : mutable );
971 ---Purpose: Resets the centring of the view.
974 Reset ( me : mutable; update : Boolean from Standard = Standard_True );
976 ---Purpose: Resets the centring and the orientation of the view
978 ---------------------------------------------------
979 ---Category: Inquire methods
980 ---------------------------------------------------
982 Convert( me ; Vp : Integer ) returns Length
984 ---Purpose : Converts the PIXEL value
985 -- to a value in the projection plane.
986 raises UnMapped from V3d;
987 -- If the view is not mapped on the window.
989 Convert( me ; Xp,Yp : Integer ; Xv,Yv : out Coordinate )
991 ---Purpose : Converts the point PIXEL into a point projected
992 -- in the reference frame of the projection plane.
993 raises UnMapped from V3d;
994 -- If the view is not mapped on the window.
996 Convert( me ; Vv : Length ) returns Integer
998 ---Purpose : Converts tha value of the projection plane into
1000 raises UnMapped from V3d;
1001 -- If the view is not mapped on the window.
1003 Convert( me ; Xv,Yv : Coordinate ; Xp,Yp : out Integer )
1005 ---Purpose : Converts the point defined in the reference frame
1006 -- of the projection plane into a point PIXEL.
1007 raises UnMapped from V3d;
1008 -- If the view is not mapped on the window.
1010 Convert( me ; Xp,Yp : Integer ; X,Y,Z : out Coordinate)
1012 ---Purpose : Converts the projected point into a point
1013 -- in the reference frame of the view corresponding
1014 -- to the intersection with the projection plane
1015 -- of the eye/view point vector.
1016 raises UnMapped from V3d;
1017 -- If the view is not mapped on the window.
1019 ConvertWithProj( me ; Xp,Yp : Integer ; X,Y,Z : out Coordinate ; Vx,Vy,Vz : out Parameter)
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 and returns the
1025 -- projection ray for further computations.
1026 raises UnMapped from V3d;
1027 -- If the view is not mapped on the window.
1029 ConvertToGrid( me ; Xp,Yp : Integer ; Xg,Yg,Zg : out Coordinate)
1031 ---Purpose : Converts the projected point into the nearest grid point
1032 -- in the reference frame of the view corresponding
1033 -- to the intersection with the projection plane
1034 -- of the eye/view point vector and display the grid marker.
1035 -- Warning: When the grid is not active the result is identical
1036 -- to the above Convert() method.
1038 -- 1) Enable the grid echo display
1039 -- myViewer->SetGridEcho(Standard_True);
1040 -- 2) When application receive a move event :
1041 -- 2.1) Check if any object is detected
1042 -- if( myInteractiveContext->MoveTo(x,y) == AIS_SOD_Nothing ) {
1043 -- 2.2) Check if the grid is active
1044 -- if( myViewer->Grid()->IsActive() ) {
1045 -- 2.3) Display the grid echo and gets the grid point
1046 -- myView->ConvertToGrid(x,y,X,Y,Z);
1047 -- 2.4) Else this is the standard case
1048 -- } else myView->Convert(x,y,X,Y,Z);
1049 raises UnMapped from V3d;
1050 -- If the view is not mapped on the window.
1052 ConvertToGrid( me ; X,Y,Z : Coordinate ; Xg,Yg,Zg : out Coordinate)
1054 ---Purpose : Converts the point into the nearest grid point
1055 -- and display the grid marker.
1056 ---Warning: When the grid is not active the result is identical
1057 -- to the previous point.
1058 raises UnMapped from V3d;
1059 -- If the view is not mapped on the window.
1061 Convert( me ; X,Y,Z : Coordinate; Xp,Yp : out Integer) ;
1063 ---Purpose : Projects the point defined in the reference frame of
1064 -- the view into the projected point in the associated window.
1066 -- RefToPix( me ; X,Y,Z : Coordinate; Xp,Yp : out Integer) ;
1067 -- ---Purpose : Projects the point defined in the reference frame of
1068 -- -- the view into the projected point in the associated window.
1069 -- Obsolete : Use Convert(X,Y,Z,Xp,Yp);
1071 -- PixToRef( me ; Xp,Yp : Integer; X,Y,Z : out Coordinate) ;
1072 -- ---Purpose : Converts the projected point in the associated window of
1073 -- -- the view into the point defined in the reference frame.
1074 -- Obsolete : Use Convert(Xp,Yp,X,Y,Z);
1076 Project( me ; X,Y,Z : Coordinate; Xp,Yp : out Coordinate) ;
1078 ---Purpose : Converts the point defined in the user space of
1079 -- the view to the projected view plane point at z 0.
1081 BackgroundColor( me; Type : TypeOfColor ; V1, V2, V3 : out Parameter) ;
1083 ---Purpose: Returns the Background color values of the view
1084 -- depending of the color Type.
1086 BackgroundColor( me ) returns Color from Quantity;
1088 ---Purpose: Returns the Background color object of the view.
1090 GradientBackgroundColors( me;
1091 Color1 : out Color from Quantity;
1092 Color2 : out Color from Quantity) ;
1094 ---Purpose: Returns the gradient background colour objects of the view.
1096 GradientBackground ( me ) returns GradientBackground from Aspect;
1098 ---Purpose: Returns the gradient background of the view.
1100 Scale ( me ) returns Factor ;
1102 ---Purpose: Returns the current value of the zoom expressed with
1103 -- respect to SetViewMappingDefault().
1105 AxialScale ( me ; Sx, Sy, Sz : out Real from Standard ) ;
1107 ---Purpose: Returns the current values of the anisotropic (axial) scale factors.
1109 Center ( me; Xc,Yc : out Coordinate );
1111 ---Purpose: Returns the centre of the view.
1113 Size ( me; Width, Height : out Length );
1115 ---Purpose: Returns the height and width of the view.
1117 ZSize ( me ) returns Real ;
1119 ---Purpose: Returns the Depth of the view .
1121 Eye( me ; X,Y,Z : out Coordinate );
1123 ---Purpose: Returns the position of the eye.
1125 FocalReferencePoint (me ; X,Y,Z : out Coordinate );
1127 ---Purpose: Returns the position of point which emanating the
1130 ProjReferenceAxe( me ; Xpix,Ypix : Integer ;
1131 XP,YP,ZP,VX,VY,VZ : out Coordinate );
1133 ---Purpose: Returns the coordinate of the point (Xpix,Ypix)
1134 -- in the view (XP,YP,ZP), and the projection vector of the
1135 -- view passing by the point (for PerspectiveView).
1137 Depth( me ) returns Length ;
1139 ---Purpose: Returns the Distance between the Eye and View Point.
1141 Proj( me ; Vx,Vy,Vz : out Parameter );
1143 ---Purpose: Returns the projection vector.
1145 At( me ; X,Y,Z : out Coordinate );
1147 ---Purpose: Returns the position of the view point.
1149 Up( me ; Vx,Vy,Vz : out Parameter );
1151 ---Purpose: Returns the vector giving the position of the high point.
1153 Twist( me ) returns PlaneAngle ;
1155 ---Purpose: Returns in RADIANS the orientation of the view around
1156 -- the visual axis measured from the Y axis of the screen.
1158 ShadingModel ( me ) returns TypeOfShadingModel ;
1160 ---Purpose: Returns the current shading model.
1162 SurfaceDetail(me) returns TypeOfSurfaceDetail;
1164 -- purpose: returns the current SurfaceDetail mode
1166 TextureEnv(me) returns TextureEnv from Graphic3d;
1168 -- purpose: return the current environment texture used
1170 Transparency(me) returns Boolean from Standard;
1172 ---Purpose: Returns the transparency activity.
1174 Visualization ( me ) returns TypeOfVisualization from V3d;
1176 ---Purpose: Returns the current visualisation mode.
1178 Antialiasing ( me ) returns Boolean;
1180 ---Purpose: Indicates if the antialiasing is active (True) or
1181 -- inactive (False).
1183 ZCueing ( me; Depth, Width : out Length ) returns Boolean ;
1185 ---Purpose: Returns activity and information on the Zcueing.
1186 -- <Depth> : Depth of plane.
1187 -- <Width> : Thickness around the plane.
1189 ZClipping ( me; Depth, Width : out Length ) returns TypeOfZclipping;
1191 ---Purpose: Returns current information on the ZClipping.
1192 -- <Depth> : Depth of plane.
1193 -- <Width> : Thickness around the plane.
1194 -- <TypeOfZclipping> : "BACK"
1199 IfMoreLights( me ) returns Boolean;
1201 ---Purpose: Returns True if One light more can be
1202 -- activated in this View.
1204 InitActiveLights(me: mutable);
1206 ---Purpose: initializes an iteration on the active Lights.
1208 MoreActiveLights (me) returns Boolean from Standard;
1210 ---Purpose: returns true if there are more active Light(s) to return.
1212 NextActiveLights (me: mutable);
1214 ---Purpose : Go to the next active Light
1215 -- (if there is not, ActiveLight will raise an exception)
1217 ActiveLight(me) returns mutable Light from V3d;
1220 IfMorePlanes( me ) returns Boolean;
1222 ---Purpose: Returns True if One clipping plane more can be
1223 -- activated in this View.
1225 InitActivePlanes(me: mutable);
1227 ---Purpose: initializes an iteration on the active Planes.
1229 MoreActivePlanes (me) returns Boolean from Standard;
1231 ---Purpose: returns true if there are more active Plane(s) to return.
1233 NextActivePlanes (me: mutable);
1235 ---Purpose : Go to the next active Plane
1236 -- (if there is not, ActivePlane will raise an exception)
1238 ActivePlane(me) returns mutable Plane from V3d;
1241 Viewer ( me ) returns mutable Viewer from V3d;
1243 ---Purpose: Returns the viewer in which the view has been created.
1245 IfWindow ( me ) returns Boolean;
1247 ---Purpose: Returns True if MyView is associated with a window .
1249 Window ( me ) returns mutable Window from Aspect
1251 ---Purpose: Returns the Aspect Window associated with the view.
1252 raises BadValue from Viewer;
1253 -- If MyView is not associated with a window
1255 Type( me ) returns TypeOfView from V3d;
1257 ---Purpose: Returns the Type of the View
1259 Pan ( me : mutable; Dx, Dy: Integer from Standard;
1260 aZoomFactor: Factor from Quantity = 1);
1262 ---Purpose: translates the center of the view and zooms the view.
1263 -- and updates the view.
1265 Zoom ( me : mutable; X1 , Y1 , X2 , Y2 : Integer from Standard)
1268 ---Purpose: Zoom the view according to a zoom factor computed
1269 -- from the distance between the 2 mouse position <X1,Y1>,<X2,Y2>
1271 Zoom ( me: mutable; X,Y: Integer from Standard)
1274 ---Purpose: Zoom the view according to a zoom factor computed
1275 -- from the distance between the last and new mouse position <X,Y>
1277 StartZoomAtPoint(me : mutable;
1278 xpix, ypix : Integer from Standard);
1280 ---Purpose: Defines the point (pixel) of zooming (for the method ZoomAtPoint()).
1282 ZoomAtPoint(me : mutable;
1283 mouseStartX, mouseStartY, mouseEndX, mouseEndY : Integer from Standard);
1285 ---Purpose: Zooms the model at a pixel defined by the method StartZoomAtPoint().
1287 AxialScale ( me: mutable; Dx, Dy: Integer from Standard; Axis: TypeOfAxe from V3d );
1289 ---Purpose: Performs anisotropic scaling of <me> view along the given <Axis>.
1290 -- The scale factor is calculated on a basis of
1291 -- the mouse pointer displacement <Dx,Dy>.
1292 -- The calculated scale factor is then passed to SetAxialScale(Sx, Sy, Sz) method.
1294 StartRotation(me : mutable ; X,Y :Integer from Standard;
1295 zRotationThreshold: Ratio from Quantity = 0.0);
1297 ---Purpose: Begin the rotation of the view arround the screen axis
1298 -- according to the mouse position <X,Y>.
1299 -- Warning: Enable rotation around the Z screen axis when <zRotationThreshold>
1300 -- factor is > 0 soon the distance from the start point and the center
1301 -- of the view is > (medium viewSize * <zRotationThreshold> ).
1302 -- Generally a value of 0.4 is usable to rotate around XY screen axis
1303 -- inside the circular treshold area and to rotate around Z screen axis
1304 -- outside this area.
1306 Rotation(me:mutable; X,Y :Integer from Standard);
1308 ---Purpose: Continues the rotation of the view
1309 -- with an angle computed from the last and new mouse position <X,Y>.
1311 FitAll ( me : mutable ; aWindow: Window from Aspect;
1312 Umin, Vmin, Umax, Vmax : Coordinate )
1315 ---Purpose: Change the scale factor and position of the view
1316 -- such as the bounding box <Umin, Vmin, Umax, Vmax> is contains
1320 -----------------------------------------
1321 ---Category: Private or Protected methods
1322 -----------------------------------------
1324 SetFocale( me : mutable ; Focale : Length )
1325 ---Purpose: Change View Plane Distance for Perspective Views
1326 raises TypeMismatch from Standard
1327 ---Purpose: Warning! raises TypeMismatch from Standard if the view
1328 -- is not a perspective view.
1331 Focale( me ) returns Length;
1332 ---Purpose: Returns the View Plane Distance for Perspective Views
1334 View ( me) returns mutable View from Visual3d is static ;
1336 ---Purpose: Returns the associated Visual3d view.
1338 ViewMapping ( me ) returns ViewMapping from Visual3d is static;
1340 ---Purpose: Returns the current mapping of the view.
1342 ViewOrientation ( me ) returns ViewOrientation from Visual3d is static;
1344 ---Purpose: Returns the current orientation of the view.
1346 ScreenAxis( myclass ; Vpn,Vup : Vector from Graphic3d ;
1347 Xaxe,Yaxe,Zaxe : out Vector from Graphic3d )
1348 returns Boolean is private ;
1349 ---Purpose: Determines the screen axes in the reference
1350 -- framework of the view.
1352 InitMatrix ( myclass ; Matrix : out Array2OfReal from TColStd ) is private ;
1355 Left, Right : Array2OfReal from TColStd ;
1356 Matrix : out Array2OfReal from TColStd )
1357 returns Boolean from Standard is private ;
1359 RotAxis( myclass ; Vrp : Vertex from Graphic3d ;
1360 Axe : Vector from Graphic3d ; Angle : PlaneAngle ;
1361 Matrix : out Array2OfReal from TColStd ) is private ;
1362 ---Purpose: Determines the rotation matrice around an axis
1363 -- for a given angle.
1365 TrsPoint( myclass ; P : Vertex from Graphic3d ;
1366 Matrix : Array2OfReal from TColStd )
1367 returns Vertex from Graphic3d is private ;
1368 ---Purpose: Transforms the point P according to the matrice Matrix .
1370 TrsPoint( myclass ; V : Vector from Graphic3d ;
1371 Matrix : Array2OfReal from TColStd )
1372 returns Vector from Graphic3d is private ;
1373 ---Purpose: Transforms the vector V according to the matrice Matrix .
1375 -----------------------------------------
1376 ---Category: TransientManager methods
1377 -----------------------------------------
1379 TransientManagerBeginDraw(me; DoubleBuffer: Boolean = Standard_False;
1380 RetainMode : Boolean = Standard_False)
1382 ---Purpose: Begins any graphics in the view <aView>
1383 -- Redraw any structured graphics in the back buffer before
1384 -- if <DoubleBuffer> is TRUE.
1385 -- Restore the front buffer from the back before
1386 -- if <DoubleBuffer> is FALSE.
1387 -- if <RetainMode> is TRUE.
1388 -- the graphic managed itself exposure,resizing ...
1389 -- if <RetainMode> is FALSE.
1390 -- the application must managed itself exposure,resizing ...
1392 returns Boolean from Standard;
1394 TransientManagerClearDraw(me);
1396 ---Purpose: Clear all transient graphics in the view <aView>
1399 TransientManagerBeginAddDraw(me)
1401 ---Purpose: Begins any add graphics in the view <aView>
1402 -- Redraw any structured graphics in the back buffer before
1403 -- the application must managed itself exposure,resizing ...
1404 -- Warning: Returns TRUE if transient drawing is enabled in
1405 -- the associated view.
1406 -- Returns FALSE ,if nothing works because something
1407 -- is wrong for the transient principle :
1409 returns Boolean from Standard;
1411 ---------------------------------------------------
1412 -- Category: Methods to modify the class definition
1414 ---------------------------------------------------
1416 SetAnimationModeOn ( me : mutable )
1419 ---Purpose: Activates animation mode.
1420 -- When the animation mode is activated in the view,
1421 -- all Graphic3d_Structure are stored in a graphic object.
1422 ---Category: Methods to modify the class definition
1424 SetAnimationModeOff ( me : mutable )
1427 ---Purpose: Deactivates the animation mode.
1428 ---Category: Methods to modify the class definition
1430 AnimationModeIsOn ( me )
1431 returns Boolean from Standard
1434 ---Purpose: Returns the activity of the animation mode.
1435 ---Category: Inquire methods
1437 SetAnimationMode ( me : mutable;
1438 anAnimationFlag : Boolean from Standard = Standard_True;
1439 aDegenerationFlag : Boolean from Standard = Standard_False
1442 ---Purpose : Enable/Disable animation/degeneration mode
1443 ---Category : Methods to modify the class definition
1445 AnimationMode ( me; isDegenerate: out Boolean from Standard )
1446 returns Boolean from Standard
1449 ---Purpose : Returns the animation and degenerate status.
1450 ---Category: Inquire methods
1452 ---------------------------------------------------
1453 -- Category: Methods to modify the class definition
1455 ---------------------------------------------------
1457 SetDegenerateModeOn ( me : mutable )
1460 ---Purpose: Activates degenerate mode.
1461 -- When the degenerate mode is activated in the view,
1462 -- all Graphic3d_Structure with the type TOS_COMPUTED
1463 -- displayed in this view are not computed.
1464 -- Warning: Obsolete method , use SetComputedMode()
1465 ---Category: Methods to modify the class definition
1467 SetDegenerateModeOff ( me : mutable )
1470 ---Purpose: Deactivates the degenerate mode.
1471 -- Category: Methods to modify the class definition
1472 -- Warning: if the computed mode has been disabled in the
1473 -- viewer the mode will remain degenerated.
1474 -- Warning: Obsolete method , use SetComputedMode()
1476 DegenerateModeIsOn ( me )
1477 returns Boolean from Standard
1480 ---Purpose: Returns the activity of the degenerate mode.
1481 ---Category: Inquire methods
1483 SetComputedMode ( me : mutable; aMode : Boolean from Standard )
1486 ---Purpose: Switches computed HLR mode in the view
1487 ---Category: Methods to modify the class definition
1490 returns Boolean from Standard
1493 ---Purpose: Returns the computed HLR mode state
1494 ---Category: Inquire methods
1496 MinMax ( me; Umin,Vmin, Umax,Vmax : out Coordinate ) returns Integer
1497 ---Purpose: Returns the objects number and the projection window
1498 -- of the objects contained in the view.
1501 MinMax ( me; Xmin,Ymin,Zmin, Xmax,Ymax,Zmax : out Coordinate )
1503 ---Purpose: Returns the objects number and the box encompassing
1504 -- the objects contained in the view
1507 Gravity ( me; X,Y,Z : out Coordinate ) returns Integer
1508 ---Purpose: Returns the Objects number and the gravity center
1509 -- of ALL viewable points in the view
1512 Init(me: mutable) is private;
1514 ---Category: for compatibility.
1516 WindowFitAll ( me : mutable ; Xmin, Ymin, Xmax, Ymax : Integer);
1517 ---Purpose: idem than WindowFit
1519 SetPlotter ( me : mutable; aPlotter : Plotter from Graphic3d )
1520 ---Purpose: Set a plotter for plotting the contents of the view
1524 Plot ( me : mutable )
1525 ---Purpose: Create a 2D View for plotting the contents of the view
1526 raises BadValue from Viewer;
1527 -- if the plotter is undefined.
1529 Compute ( me; AVertex : Vertex from Graphic3d )
1530 returns Vertex from Graphic3d
1533 ---Purpose: Returns a new vertex when the grid is activated.
1535 SetGrid ( me : mutable;
1536 aPlane: Ax3 from gp;
1537 aGrid : Grid from Aspect )
1540 ---Purpose: Defines or Updates the definition of the
1542 ---Category: Methods to modify the class definition
1544 SetGridGraphicValues ( me : mutable;
1545 aGrid : Grid from Aspect )
1548 ---Purpose: Defines or Updates the graphic definition of the
1550 ---Category: Methods to modify the class definition
1552 SetGridActivity ( me : mutable;
1553 aFlag : Boolean from Standard )
1556 ---Purpose: Defines or Updates the activity of the
1558 ---Category: Methods to modify the class definition
1560 Tumble ( me : mutable;
1561 NbImages : Integer from Standard = 314;
1562 AnimationMode : Boolean from Standard = Standard_False )
1563 returns Real from Standard
1566 ---Purpose: Animates the view <me>
1567 -- Returns the number of images per second
1568 -- if <AnimationMode> is Standard_True, the animation mode
1571 ScreenCopy (me : mutable;
1572 aPlotterDriver : PlotterDriver from PlotMgt;
1573 fWhiteBackground : Boolean from Standard = Standard_True;
1574 aScale : Factor from Quantity = 1.0
1576 ---Purpose: dump the view
1579 theFile: CString from Standard;
1580 theBufferType : TypeOfImage from Image = Image_TOI_RGB )
1581 returns Boolean from Standard;
1583 ---Purpose: dump the full contents of the view at the same
1584 -- scale in the file <theFile>. The file name
1585 -- extension must be one of ".png",".bmp",".jpg",".gif".
1586 -- Returns FALSE when the dump has failed
1589 theFile : CString from Standard;
1590 theFormat : FormatOfSheetPaper from Aspect;
1591 theBufferType : TypeOfImage from Image = Image_TOI_RGB )
1592 returns Boolean from Standard;
1594 ---Purpose: dump the full contents of the view with a
1595 -- different scale according to the required sheet
1596 -- paper size (format) and the ratio
1597 -- width/height of the view.
1598 -- and returns FALSE when the dump has failed
1599 -- Warning : the file name extension must be one of
1600 -- ".png",".bmp",".jpg",".gif"
1601 -- but make becarefull about the time to dump and
1602 -- resulting file size especially for the A0 format.
1603 -- NOTE that you can use after any standard system utility
1604 -- for editing or sending the image file to a laser printer.
1605 -- (i.e: Microsoft Photo Editor on Windows system
1606 -- or Image Viewer on SUN system)
1608 Print (me; hPrnDC: Handle from Aspect = NULL;
1609 showDialog: Boolean = Standard_True;
1610 showBackground : Boolean = Standard_True;
1611 filename: CString = NULL;
1612 printAlgorithm : PrintAlgo from Aspect = Aspect_PA_STRETCH)
1613 returns Boolean from Standard is static;
1616 ---Purpose: print the contents of the view to printer with preview.
1617 -- <hPrnDC> : If you have already an PrinterDeviceContext (HDC),
1618 -- then you can pass it to the print routines.
1619 -- If you don't have an PrinterDeviceContext, then this parameter should
1621 -- <showDialog> : If hPrnDC == NULL, then you can force the print routines to
1622 -- open a Print Dialog box.
1623 -- If you want to do this, then set showDialog to TRUE
1624 -- If you don't want to see a dialog (only possible, if you have a hPrnDC
1625 -- or the dialog box was opened once before) then set <showDialog> to FALSE.
1626 -- <showBackground> : When set to FALSE then print the view without background color
1627 -- (background is white)
1628 -- else set to TRUE for printing with current background color.
1629 -- <filename>: If != NULL, then the view will be printed to a file.
1630 -- <printAlgorithm>: If you want to select the print algorithm, then you can
1631 -- specify one of existing algorithms: Aspect_PA_STRETCH, Aspect_PA_TILE.
1632 -- Returns Standard_True if the data is passed to the printer, otherwise
1633 -- Standard_False if the print operation failed. This might be related to
1634 -- insufficient memory or some internal errors. All this errors are
1635 -- indicated by the message boxes (on level of OpenGl_GraphicDriver).
1636 -- Warning: This function can reuse FBO assigned to the
1637 -- view on level of OpenGl_GraphicDriver; Please take it into account if
1638 -- you use it for your purposes;
1639 -- Warning: Works only under Windows.
1641 ToPixMap ( me : mutable;
1642 theWidth : Integer from Standard;
1643 theHeight : Integer from Standard;
1644 theBufferType : TypeOfImage from Image = Image_TOI_RGB;
1645 theForceCentered : Boolean from Standard = Standard_True )
1646 returns PixMap from Image;
1648 ---Purpose : dump the full contents of the view
1649 -- to a pixmap of pixel size <theWidth>*<theHeight> and
1650 -- buffer type <theBufferType>. If <theForceCentered> is true
1651 -- view scene will be centered.
1653 SetProjModel( me : mutable;
1654 amOdel: TypeOfProjectionModel from V3d = V3d_TPM_SCREEN )
1657 ---Purpose : Manages projection model
1660 returns TypeOfProjectionModel from V3d
1663 ---Purpose : Returns the current projection model
1665 SetBackFacingModel ( me : mutable;
1666 aModel : TypeOfBackfacingModel from V3d = V3d_TOBM_AUTOMATIC)
1669 ---Purpose : Manages display of the back faces
1670 -- When <aModel> is TOBM_AUTOMATIC the object backfaces
1671 -- are displayed only for surface objects and
1672 -- never displayed for solid objects.
1673 -- this was the previous mode.
1674 -- <aModel> is TOBM_ALWAYS_DISPLAYED the object backfaces
1675 -- are always displayed both for surfaces or solids.
1676 -- <aModel> is TOBM_NEVER_DISPLAYED the object backfaces
1677 -- are never displayed.
1679 BackFacingModel ( me )
1680 returns TypeOfBackfacingModel from V3d
1683 ---Purpose : Returns current state of the back faces display
1685 EnableDepthTest( me; enable : Boolean from Standard = Standard_True )
1688 ---Purpose: turns on/off opengl depth testing
1690 IsDepthTestEnabled( me ) returns Boolean from Standard
1693 ---Purpose: returns the current state of the depth testing
1695 EnableGLLight( me; enable : Boolean from Standard = Standard_True )
1698 ---Purpose: turns on/off opengl lighting, currently used in triedron displaying
1700 IsGLLightEnabled( me ) returns Boolean from Standard
1703 ---Purpose: returns the current state of the gl lighting
1704 -- currently used in triedron displaying
1709 MyType : TypeOfView from V3d is protected ;
1710 MyViewer : ViewerPointer from V3d ;
1711 MyActiveLights: ListOfTransient from V3d;
1712 MyActivePlanes: ListOfTransient from V3d;
1714 MyView : View from Visual3d is protected ;
1715 MyViewMapping : ViewMapping from Visual3d is protected ;
1716 MyViewOrientation : ViewOrientation from Visual3d ;
1717 MyViewContext : ContextView from Visual3d ;
1718 MyBackground: Background from Aspect ;
1719 MyGradientBackground: GradientBackground from Aspect ;
1720 MyDefaultViewAxis: Vector from Graphic3d ;
1721 MyDefaultViewPoint: Vertex from Graphic3d ;
1723 MyWindow: Window from Aspect;
1725 MyPlotter: Plotter from Graphic3d;
1727 myActiveLightsIterator: ListIteratorOfListOfTransient from TColStd;
1728 myActivePlanesIterator: ListIteratorOfListOfTransient from TColStd;
1730 sx,sy: Integer from Standard;
1731 rx,ry: Real from Standard;
1732 gx,gy,gz: Real from Standard;
1733 myComputedMode: Boolean from Standard;
1734 SwitchSetFront: Boolean from Standard;
1735 MyZoomAtPointX, MyZoomAtPointY : Integer from Standard;
1738 MyGrid : Grid from Aspect;
1739 MyPlane : Ax3 from gp;
1741 --MyColorScale : ColorScale from V3d;
1742 MyLayerMgr : LayerMgr from V3d;
1744 -- the transformation between XoY and the grid plane
1745 MyTrsf : Array2OfReal from TColStd;
1748 MyGridEchoStructure : Structure from Graphic3d;
1749 MyGridEchoGroup : Group from Graphic3d;
1751 MyProjModel : TypeOfProjectionModel from V3d is protected;
1752 MyAnimationFlags : Integer from Standard;
1754 MyTransparencyFlag : Boolean from Standard;
1757 SetViewOn from class Viewer from V3d ( me : mutable ),
1758 SetViewOn from class Viewer from V3d ( me : mutable ; View : View from V3d ),
1759 SetViewOff from class Viewer from V3d ( me : mutable ),
1760 SetViewOff from class Viewer from V3d ( me : mutable ; View : View from V3d )