]> SALOME platform Git repositories - modules/visu.git/blob - idl/VISU_Gen.idl
Salome HOME
Join modifications from BR_Dev_For_4_0 tag V4_1_1.
[modules/visu.git] / idl / VISU_Gen.idl
1 //  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
2 //  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
3 // 
4 //  This library is free software; you can redistribute it and/or 
5 //  modify it under the terms of the GNU Lesser General Public 
6 //  License as published by the Free Software Foundation; either 
7 //  version 2.1 of the License. 
8 // 
9 //  This library is distributed in the hope that it will be useful, 
10 //  but WITHOUT ANY WARRANTY; without even the implied warranty of 
11 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
12 //  Lesser General Public License for more details. 
13 // 
14 //  You should have received a copy of the GNU Lesser General Public 
15 //  License along with this library; if not, write to the Free Software 
16 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
17 // 
18 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19 //
20 //  File   : VISU_Gen.idl
21 //  Author : Alexey Petrov
22
23 /*! \file VISU_Gen.idl This file conatins a set of interfaces of the %VISU module.
24  *     This module provides various forms of data visualization in %SALOME application.
25  *     These forms include data tables, XY plots, 3d representations
26  *     and combination of these forms.
27  */
28
29 #ifndef __VISU_GEN__
30 #define __VISU_GEN__
31
32 #include "SALOME_Exception.idl"
33 #include "SALOME_GenericObj.idl"
34 #include "SALOME_Component.idl"
35 #include "SALOMEDS.idl"
36 #include "SALOMEDS_Attributes.idl"
37 #include "MED.idl"
38
39 /*!
40   The main package of interfaces of the post-processing module %VISU.
41 */
42 module VISU {
43   //-------------------------------------------------------
44   typedef string IdType;
45
46   typedef sequence<string> string_array;
47
48   /*!
49    * This enumeration contains a set of elements defining the type
50    * of the scaling, which can be applied on different presentations.
51    */
52   enum Scaling{ LINEAR, /*!< Linear type of scaling. */
53                 LOGARITHMIC /*!< Logarithmic type of scaling. */
54               };
55
56   /*!
57    * This enumeration contains a set of elements defining the
58    * type of the %entity (topological units) constituting a mesh.
59    */
60   enum Entity {
61     NODE, /*!< Node corresponds to a geometrical point. */
62     EDGE, /*!< Edge corresponds to a geometrical line connecting two points. */
63     FACE, /*!< Face corresponds to a geometrical plane bounded by several lines. */
64     CELL,  /*!< Cell is a volumic element of a mesh */
65     NONE  /*!< Indicates undefined entity value */
66   };
67
68   /*!
69    * This enumeration contains a set of elements defining the type of the %VISU object.
70    * This enumeration is used for navigation between a set of %VISU interfaces.
71    */
72   enum VISUType {
73     TNONE, /*!< Not a %VISU object */
74     TCURVE, /*!< Curve line object for construction of 2D XY plots */
75     TTABLE, /*!< Table containing numerical data */
76     TCONTAINER, /*!< Container object used for storing a set of curve lines */
77     TMESH, /*!< Meshing object */
78     TSCALARMAP, /*!< Scalarmap 3D presentation object */
79     TISOSURFACES, /*!< Iso surface 3D presentation object */
80     TDEFORMEDSHAPE, /*!< Deformed shape 3D presentation object */
81     TSCALARMAPONDEFORMEDSHAPE, /*!< Scalar map on deformed shape 3D presentation object */
82     TGAUSSPOINTS, /*!< Gauss Points 3D presentation object */
83     TPLOT3D, /*!< Plot3D 3D presentation object */
84     TCUTPLANES, /*!< Cut planes 3D presentation object */
85     TCUTLINES, /*!< Cut lines 3D presentation object */
86     TVECTORS, /*!< Vectors 3D presentation object */
87     TSTREAMLINES, /*!< Streamlines 3D presentation object */
88     TVISUGEN, /*!< %VISU generator used for performing operations with different %VISU objects */
89     TVIEWMANAGER, /*!< View manager used for performing operations with different views */
90     TRESULT, /*!< The data on which different presentations are based */
91     TXYPLOT, /*!< 2D XY plot consisting of one or several curve lines */
92     TTABLEVIEW, /*!< Table view is used for displaying data tables */
93     TVIEW3D, /*!< 3D view is used for displaying 3D graphical presentations */
94     TGAUSSVIEW, /*!< 3D view is used for displaying Gauss Points graphical presentations */
95     TENTITY, /*!< An element composing a mesh: node, edge, face or cell */
96     TFAMILY, /*!< The whole mesh can be divided into one or several submeshes, called families, which are defined by the user. Each family in its turn is composed of entities of a definite type. */
97     TGROUP, /*!< A group of families */
98     TFIELD, /*!< Field represents the results of calculations (it can be scalar or vector values), grouped together under one physical concept. */
99     TTIMESTAMP, /*!<Time stamp represents a subfield: the results of calculations are taken in one definite moment. */
100     TANIMATION, /*!< Represents Animation object. */
101     TCOLOREDPRS3DHOLDER, /*!< Colored 3D presentation holder */
102     TCOLOREDPRS3DCACHE, /*!< Colored 3D presentation cache */
103     TPART, /*!< MULTIPR: part of a mesh */
104     TALL
105   };
106
107   interface Base {
108     /*!
109      * Returns ID of the object.
110      */
111     IdType GetID();
112
113     /*!
114      * Returns the type of the presentable object
115      */
116     VISUType GetType();
117   };
118
119   /*!
120    *  \brief Removable object interface
121    *
122    *  Removable object interface is the root class of all removable objects.
123    */
124   interface RemovableObject : Base {
125     /*!
126      *  Remove object from study.
127      */
128     void RemoveFromStudy();
129   };
130
131   /*! \brief Presentable object interface
132    *
133    * Presentable object interface is the root class of all presentable objects.
134    */
135   interface PrsObject : RemovableObject {
136   };
137
138   //-------------------------------------------------------
139   /*! \brief %Table representation interface
140    *
141    * Presentation parameters of the %Table view.
142    */
143   interface Table : PrsObject {
144     /*!
145      * Sets the title of the table.
146      * \param theTitle String parameter defining the title of this table.
147      */
148     void SetTitle(in string theTitle);
149
150     /*!
151      * Gets the title of the table.
152      * \return A string value containing the title of the table.
153     */
154     string GetTitle();
155
156     /*!
157      * This enumeration contains a set of elements defining the orientation of the table.
158      */
159     enum Orientation {
160       HORIZONTAL, /*!< Horizontal orientation of the table. */
161       VERTIACAL   /*!< Vertical orientation of the table. */
162     };
163
164     /*!
165      * Sets orientation of the table.
166      * \param theOrientation This input parameter defines the orientation of the table.
167      *                       It is taken from the <VAR>Orientation</VAR> enumeration.
168      */
169     void SetOrientation(in Orientation theOrientation);
170
171     /*!
172      * Gets orientation of the table.
173      * \return Orientation of the table. The returned value will correspond
174      *         to one of the elements the <VAR>Orientation</VAR> enumeration.
175      */
176     Orientation GetOrientation();
177
178     /*!
179      * Gets the number of rows of the table.
180      * \return Long value corresponding to the number of rows of the table
181      */
182     long GetNbRows();
183
184     /*!
185      * Gets the number of columns of the table.
186      * \return Long value corresponding to the number of columns of the table
187      */
188     long GetNbColumns();
189   };
190
191   //-------------------------------------------------------
192   /*! \brief Interface of curve representation.
193    *
194    * Manages presentation parameters of one curve.
195    * It can be used for presentation of a set of curves using a combined presentation.
196    */
197   interface Curve : PrsObject {
198     /*!
199      * Sets the title of the curve.
200      * \param theTitle This string parameter defines the title of this curve.
201      */
202     void SetTitle(in string theTitle);
203
204     /*!
205      * Gets the title of the curve.
206      * \return String value corresponding to the title of the curve.
207      */
208     string GetTitle();
209
210     /*!
211      * Sets the color of the curve.
212      * \param theColor The color of the curve. This parameter is taken
213      *                 from the <VAR>Orientation</VAR> enumeration.
214      */
215     void SetColor(in SALOMEDS::Color theColor);
216
217     /*!
218      * Gets the color of the curve.
219      * \return Color of the curve. The returned value will correspond
220      *         to one of the elements the <VAR>Color</VAR> enumeration.
221      */
222     SALOMEDS::Color GetColor();
223
224     /*!
225      * This enumeration contains a set of elements defining the
226      * presentation type of markers (data points) with help of
227      * which the curve is constructed on the graphics.
228      */
229     enum MarkerType { NONE,
230                       CIRCLE,
231                       RECTANGLE,
232                       DIAMOND,
233                       DTRIANGLE,
234                       UTRIANGLE,
235                       LTRIANGLE,
236                       RTRIANGLE,
237                       CROSS,
238                       XCROSS
239     };
240
241     /*!
242      * Sets the presentation type of markers (data points) with help of
243      * which the curve is constructed on the graphics.
244      * \param theType This parameter defines the type of marker with help
245      *                of which the curve is constructed on the graphics.
246      *                It is taken from <VAR>MarkerType</VAR> enumeration.
247      */
248     void SetMarker(in MarkerType theType);
249
250     /*!
251      * Gets the presentation type of markers (data points) with
252      * help of which the curve is constructed on the graphics.
253      * \return The type of marker with help of which the curve is constructed
254      *         on the graphics. The returned value will correspond to
255      *         one of the elements the <VAR>MarkerType</VAR> enumeration.
256      */
257     MarkerType GetMarker();
258
259     /*!
260      * This enumeration contains a set of elements defining the
261      * type of presentation of a curve line on the graphics.
262      */
263     enum LineType{ VOIDLINE, SOLIDLINE, DASHLINE, DOTLINE, DASHDOTLINE, DASHDOTDOTLINE};
264
265     /*!
266      * Sets the type of presentation of curve lines on the graphics.
267      * \param theType This parameter defines the type of presentation of curve lines on the graphics.
268      * \param theLineWidth Long value defining the width of the curve line.
269      */
270     void SetLine(in LineType theType, in long theLineWidth);
271
272     /*!
273      * Gets the type of representation of curve lines on the graphics.
274      * \return The type of representation of curve lines on the graphics.
275      */
276     LineType GetLine();
277
278     /*!
279      * Gets the width of the curve line.
280      * \return Long value corresponding to the width of the curve line.
281      */
282     long GetLineWidth();
283   };
284
285   //-------------------------------------------------------
286   /*! \brief %Container presentable object interface
287    *
288    * This class is provided in order to create one presentation using several presentable objects.
289    * This can provide a combination of a set of curves to display them in XY plot view.
290    */
291   interface Container : PrsObject {
292     /*!
293      * Adds a curve into the container.
294      * \param theCurve The added curve.
295      */
296     void AddCurve(in Curve theCurve);
297
298     /*!
299      * Removes a curve from the container.
300      * \param theCurve The removed curve.
301      */
302     void RemoveCurve(in Curve theCurve);
303
304     /*!
305      * Gets the number of curves which are stored in the container.
306      * \return A long value corresponding to the number of curves which are stored in the container.
307      */
308     long GetNbCurves();
309
310     /*!
311      * Removes all curves from the container.
312      */
313     void Clear();
314   };
315
316   //-------------------------------------------------------
317   interface Result;
318   /*! \brief 3D presentation interface
319    *
320    * This is a root class for all 3D presentations, which can be displayed in %VISU module.
321    */
322   interface Prs3d : PrsObject, SALOME::GenericObj 
323   {
324     /*!
325      * Move the 3D presentation according to the given offset parameters
326      */
327     void SetOffset(in float theDx, in float theDy, in float theDz);
328
329     /*!
330      * Gets offset parameters for the 3D presentation
331      */
332     void GetOffset(out float theDx, out float theDy, out float theDz);
333
334     /*!
335      * Gets memory size actually used by the presentation (Mb).
336      */
337     float GetMemorySize();
338   };
339
340   /*!
341    * This enumeration contains a set of elements defining the
342    * type of presentation of the mesh.
343    */
344   enum PresentationType{ POINT,
345                          WIREFRAME,
346                          SHADED,
347                          INSIDEFRAME,
348                          SURFACEFRAME,
349                          SHRINK
350   };
351
352   /*! \brief Interface of the mesh.
353    *
354    * Manages presentation parameters of a 3D presentation of a mesh.
355    * This object can be used for presentation of set of curves using Container class.
356    */
357   interface Mesh : Prs3d {
358     /*!
359      * Sets the color of mesh cells.
360      * \param theColor The color of the cells. This parameter is taken from <VAR>Color</VAR> enumeration.
361      */
362     void SetCellColor(in SALOMEDS::Color theColor);
363
364     /*!
365      * Gets the color of mesh cells.
366      */
367     SALOMEDS::Color GetCellColor();
368
369     /*!
370      * Sets the color of mesh nodes.
371      * \param theColor The color of the nodes. This parameter is taken from <VAR>Color</VAR> enumeration.
372      */
373     void SetNodeColor(in SALOMEDS::Color theColor);
374
375     /*!
376      * Gets the color of mesh nodes.
377      */
378     SALOMEDS::Color GetNodeColor();
379
380     /*!
381      * Sets the color of mesh links.
382      * \param theColor The color of the links. This parameter is taken from <VAR>Color</VAR> enumeration.
383      */
384     void SetLinkColor(in SALOMEDS::Color theColor);
385
386     /*!
387      * Gets the color of mesh links.
388      */
389     SALOMEDS::Color GetLinkColor();
390
391     /*!
392      * Sets the type of representation of a mesh.
393      * \param theType The of representation of a mesh. This parameter is
394      *                taken from <VAR>PresentationType</VAR> enumeration.
395      */
396     void SetPresentationType(in PresentationType theType);
397
398     /*!
399      * Gets the type of representation of the mesh.
400      * \return The type of representation of the mesh.
401      */
402     PresentationType GetPresentationType();
403   };
404
405
406   //-------------------------------------------------------
407   /*! \brief Basic Interface for the %Colored 3D Presentations
408    *
409    * This interface is responsable for coloring of 3D field presentations
410    * according the scalar values applied to different cells.
411    * As well it contains presentation parameters of the scalar bar. The scalar
412    * bar is displayed along with each colored field presentation and serves for
413    * consulting the correspondance between colors and data values.
414    */
415   interface ColoredPrs3d : Prs3d 
416   {
417     /*! Sets the method of coloring of the elements composing a 3D presentation.
418      */
419     void SetScalarMode(in long theScalarMode);
420
421     /*! Gets the method of coloring of the elements composing a 3D presentation.
422      */
423     long GetScalarMode();
424
425     /*!
426      * Sets scalar range - min and max boundaries of the scalar bar.
427      * \param theMin  Min boundary of the scalar bar.
428      * \param theMax  Max boundary of the scalar bar.
429      */
430     void SetRange(in double theMin, in double theMax);
431
432     /*!
433      * Gets the min boundary of the scalar bar.
434      */
435     double GetMin();
436
437     /*!
438      * Gets the max boundary of the scalar bar.
439      */
440     double GetMax();
441
442     /*!
443      * Sets scalar range that corresponds to the source data.
444      */
445     void SetSourceRange();
446
447     /*!
448      * Gets the min boundary of the scalar bar from source data.
449      */
450     double GetSourceMin();
451
452     /*!
453      * Gets the max boundary of the scalar bar from source data.
454      */
455     double GetSourceMax();
456
457     /*!
458      * Defines whether the scalar range corresponds to the source data or not.
459      */
460     boolean IsRangeFixed();
461
462     /*! \brief Position of the scalar bar.
463      *
464      * Sets the position of the scalar bar origin on the screen.
465      * \param X   Horizontal position. The value can be between 0 and 1.
466      * \param Y   Vertical position. The value can be between 0 and 1.
467      */
468     void SetPosition(in double X, in double Y);
469
470     /*!
471      * Gets horizontal position of the scalar bar origin.
472      */
473     double GetPosX();
474
475     /*!
476      * Gets vertical position of the scalar bar origin.
477      */
478     double GetPosY();
479
480     /*! \brief Size of this presentable object.
481      *
482      * Sets the size of the scalar bar.
483      * \param theWidth  Width of this presentable object. The value can be between 0 and 1.
484      * \param theHeight  Height of this presentable object. The value can be between 0 and 1.
485      */
486     void SetSize(in double theWidth, in double theHeight);
487
488     /*!
489      * Gets the width of this presentable object.
490      * \return A double value corresponding to the width of this presentable object.
491      */
492     double GetWidth();
493
494     /*!
495      * Gets the height of this presentable object.
496      * \return A double value corresponding to the height of this presentable object.
497      */
498     double GetHeight();
499
500     /*!
501      * Sets the number of colors which will be used for presentation of this presentable object.
502      * \param theNbColors A long value defining the number of colors.
503      */
504     void SetNbColors(in long theNbColors);
505
506     /*!
507      * Gets the number of colors which will be used for visualization of this presentable object.
508      * \return A long value corresponding to the number of colors which
509      *         will be used for visualization of this presentable object.
510      */
511     long GetNbColors();
512
513     /*!
514      * Sets the number of labels which will be used for indication of color gradation
515      * of the scalar bar.
516      * \param theNbLabels A long value defining the number of labels.
517      */
518     void SetLabels(in long theNbLabels);
519
520     /*!
521      * Gets the number of labels which will be used for indication of color gradation of the scalar bar.
522      * \return A long value corresponding to the number of labels which will
523      *         be used for indication of color gradation of the scalar bar.
524      */
525     long GetLabels();
526
527     /*!
528      * Sets the title of the scalar bar. By default - the name of the selected result is used.
529      * \param theName String parameter defining the name of the scalar bar.
530      */
531     void SetTitle(in string theName);
532
533     /*!
534      * Gets the title of the scalar bar.
535      */
536     string GetTitle();
537
538     /*! %Orientation of the scalar bar (to provide backward compatibility). */
539     enum Orientation {
540       HORIZONTAL, /*!< Horizontal orientation of the scalar bar.*/
541       VERTICAL    /*!< Vertical orientation of the scalar bar.*/
542     };
543
544     /*!
545      * Sets the type of orientation of the scalar bar (to provide backward compatibility).
546      * \param theOrientation This parameter defines the orientation of the scalar bar.
547      *                       It is taken from the <VAR>Orientaton</VAR> enumeration.
548      */
549     void SetBarOrientation(in Orientation theOrientation);
550
551     /*!
552      * Gets the type of orientation of the scalar bar (to provide backward compatibility).
553      */
554     Orientation GetBarOrientation();
555
556     /*!
557      * Add group as geometry of presentation.
558      * \param theMeshName  - mesh name
559      * \param theGroupName - group name
560      */
561     void AddMeshOnGroup(in string theGroupName);
562     
563     
564     /*!
565      * PrsMerger method:
566      * Remove all groups.(The scalar map will be placed on all mesh).
567      */
568     void RemoveAllGeom();
569   };
570
571
572   //-------------------------------------------------------
573   interface View3D;
574   interface ColoredPrs3dCache;
575
576
577   //-------------------------------------------------------
578   /*! \brief %ColoredPrs3dHolder interface.
579    * Interface of 3d presentation's holder, which represents colored 3d presentations,
580    * created on fields. It is publishing in the object browser in a separate folder
581    * and can be controled by viewer's slider.
582    */
583   interface ColoredPrs3dHolder : PrsObject, SALOME::GenericObj
584   {
585     /*!
586      * Presentation input parameters.
587      */
588     struct BasicInput
589     {
590       Result myResult;
591       string myMeshName;
592       Entity myEntity;
593       string myFieldName;
594       long myTimeStampNumber;
595     };
596
597     /*!
598      * Apply input parameters to last visited presentation in the cache.
599      */
600     boolean Apply(in ColoredPrs3d thePrs3d,
601                   in BasicInput theInput,
602                   in View3D theView3D);
603
604     /*!
605      * Gets the last visited presentation in the cache.
606      */
607     ColoredPrs3d GetDevice();
608
609     /*!
610      * Gets type of the managed presentations.
611      */
612     VISUType GetPrsType();
613
614     /*! Defines timestamp representation. 
615      */
616     struct TimeStampInfo
617     {
618       string myTime;
619       long myNumber;
620     };
621
622     /*! Defines representation range of timestamps. 
623      */
624     typedef sequence<TimeStampInfo> TimeStampsRange;
625
626     /*!
627      * Gets TimeStampsRange information from the last visited presentation.
628      */
629     TimeStampsRange GetTimeStampsRange();
630
631     /*!
632      * Gets input parameters of the last visited presentation.
633      */
634     BasicInput GetBasicInput();
635
636     /*!
637      * Gets a %ColoredPrs3dCache, to which the holder belongs
638      */
639     ColoredPrs3dCache GetCache();
640
641     /*!
642      * Gets memory size actually used by the holder (Mb).
643      */
644     float GetMemorySize();
645   };
646
647
648   //-------------------------------------------------------
649   /*! \brief %ColoredPrs3dCache interface.
650    * This interface is responsible for memory management of 3d presentations.
651    * One cache corresponds to one study.
652    */
653   interface ColoredPrs3dCache : RemovableObject, SALOME::GenericObj
654   {
655     /*! This enumeration contains the cache memory modes. */
656     enum MemoryMode {
657       MINIMAL, /*!< Minimal memory mode (default behaviour). */
658       LIMITED  /*!< Limited memory mode (fixed memory size for presentations). */
659     };
660
661     /*! This enumeration defines how to enlarge the cache limited memory. */
662     enum EnlargeType {
663       NO_ENLARGE, /*!< No need to enlarge (default behaviour). */
664       ENLARGE,    /*!< Enlarge limited memory. */
665       IMPOSSIBLE  /*!< Impossible to enlarge (not enough free memory). */
666     };
667
668     /*! Sets a memory mode.*/
669     void SetMemoryMode(in MemoryMode theMode);
670
671     /*! Gets a memory mode.*/
672     MemoryMode GetMemoryMode();
673
674     /*! Sets a memory size for limited mode (Mb). */
675     void SetLimitedMemory(in float theMemorySize);
676
677     /*! Gets a memory size for limited mode (Mb). */
678     float GetLimitedMemory();
679
680     /*!
681      * Gets memory size actually used by the cache system (Mb).
682      */
683     float GetMemorySize();
684
685     /*! Creates %ColoredPrs3dHolder.*/
686     ColoredPrs3dHolder CreateHolder(in VISUType theType,
687                                     in ColoredPrs3dHolder::BasicInput theInput);
688
689     /*! Gets a memory which is required to create a holder. */
690     EnlargeType GetRequiredMemory(in VISUType theType,
691                                   in ColoredPrs3dHolder::BasicInput theInput,
692                                   out float theRequiredMemory);
693   };
694
695
696   //-------------------------------------------------------
697   /*! \brief Interface of the %Scalar Map
698    *
699    * This interface is responsable for coloring of 3D field presentations
700    * according the scalar values applied to different cells.
701    * As well it contains presentation parameters of the scalar bar. The scalar
702    * bar is displayed along with each colored field presentation and serves for
703    * consulting the correspondance between colors and data values.
704    */
705   interface ScalarMap : ColoredPrs3d {
706     /*!
707      * Sets the type of scaling of the values reflected by the scalar bar.
708      * \param theScaling The value of this parameter is taken from the <VAR>Scaling</VAR> enumeration.
709      */
710     void SetScaling(in Scaling theScaling);
711
712     /*!
713      * Gets the type of scaling of the values reflected by this presentation.
714      */
715     Scaling GetScaling();
716
717   };
718
719   //-------------------------------------------------------
720   /*! \brief Gauss Points presentation interface
721    *
722    * Presentation parameters of the Gauss Points presentation.
723    */
724   //-------------------------------------------------------
725   interface GaussPoints : ColoredPrs3d 
726   {
727     //! Set flag indicating which scalar bar is active.
728     void SetIsActiveLocalScalarBar(in boolean theFlag);
729
730     //! Get flag indicating which scalar bar is active.
731     boolean GetIsActiveLocalScalarBar();
732
733     //! Set flag indicating visibility of global scalar bar.
734     void SetIsDispGlobalScalarBar(in boolean theFlag);
735
736     //! Get flag indicating visibility of global scalar bar.
737     boolean GetIsDispGlobalScalarBar();
738
739     //! Set value of the distance between global and local scalar bars.
740     void SetSpacing(in double theSpacing);
741
742     //! Get value of the distance between global and local scalar bars.
743     double GetSpacing();
744
745     /*!  
746      * Set the Multicolored mode.
747      * \param theIsColored is used to switch between Results and Geometry modes.
748      * Multiple colors are using when the presentation is
749      * drawing in the Results mode, one color - in the Geometry mode.
750      */
751     void SetIsColored(in boolean theIsColored);
752
753     //! Gets current color mode
754     boolean GetIsColored();
755
756     /*! Sets the color of this presentation in case of IsColored switched off.
757      * \param theColor The color of this presentation. This parameter
758      *                 is taken from the <VAR>Color</VAR> enumeration.
759      */
760     void SetColor(in SALOMEDS::Color theColor);
761
762     /*!
763      * When the Bicolor parameter is set to true, scalar bars are
764      * drawing with two colors : red color correspoonds to positive
765      * scalar values, blue color - to negative values.
766      */
767     void SetBiColor(in boolean theIsBiColor);
768
769     //! Get the Bicolor mode.
770     boolean GetBiColor();
771
772     //! Checks whether the Gauss Points will be deformed or not
773     boolean GetIsDeformed();
774
775     //! Apply deformation on the Gauss Points
776     void SetIsDeformed(in boolean theIsDeformed);
777
778     /*!
779      *  Sets the scale factor for scalar values
780      *  (how much corresponding mesh elements should be translated).
781      *  \param theScaleFactor The scaling factor.
782      */
783     void SetScaleFactor(in double theScaleFactor);
784
785     /*!
786      *  Gets the scale factor for scalar values.
787      *  (how much corresponding mesh elements is translated)
788      */
789     double GetScaleFactor();
790
791     /*!
792      * This enumeration contains a set of elements defining the type of representation of the vector head.
793      */
794     enum PrimitiveType { 
795       SPRITE,
796       POINT,
797       SPHERE
798     };
799
800     //! Set type of the primitives which is used for drawing the Gauss Points
801     void SetPrimitiveType(in PrimitiveType thePrimitiveType);
802
803     //! Get type of the primitives which is used for drawing the Gauss Points
804     PrimitiveType GetPrimitiveType();
805
806     //! Sets Point Sprite clamp
807     void SetClamp(in double theClamp);
808
809     //! Gets Point Sprite clamp
810     double GetClamp();
811
812     //! Sets minimum size of Point Sprites
813     void SetMinSize(in double theMinSize);
814
815     //! Gets minimum size of Point Sprites
816     double GetMinSize();
817
818     //! Sets maximum size of Point Sprites
819     void SetMaxSize(in double theMaxSize);
820
821     //! Gets maximum size of Point Sprites
822     double GetMaxSize();
823
824     //! Sets magnification for Point Sprites
825     void SetMagnification(in double theMagnification);
826
827     //! Gets magnification for Point Sprites
828     double GetMagnification();
829
830     //! Sets the increment of changing Magnification parameter
831     void SetMagnificationIncrement(in double theIncrement);
832
833     //! Gets the increment of changing Magnification parameter
834     double GetMagnificationIncrement();
835
836     //! Sets Point Sprites size
837     void SetGeomSize(in double theGeomSize);
838
839     //! Sets size of Point Sprite
840     double GetGeomSize();
841
842     //! Get path to the image using for Main Point Sprite texture
843     string GetMainTexture();
844
845     //! Get path to the image using for Alpha Point Sprite texture
846     string GetAlphaTexture();
847
848     //! Points Main and AlphaMask images to be used by Point Sprites
849     void SetTextures(in string theMainTexture, in string theAlphaTexture);
850
851     //! Sets Point Sprite Alpha threshold
852     void SetAlphaThreshold(in double theAlphaThreshold);
853
854     //! Gets Point Sprite Alpha threshold
855     double GetAlphaThreshold();
856
857     //! Sets resolution of the Geometrical Sphere
858     void SetResolution(in long theResolution);
859
860     //! Sets resolution of the Geometrical Sphere
861     long GetResolution();
862
863     //! Sets how many faces of can be drawn in the Geometrical Sphere primitive mode
864     void SetFaceLimit(in long theFaceLimit);
865
866     //! Defines how many faces of can be drawn in the Geometrical Sphere primitive mode
867     long GetFaceLimit();
868   };
869
870   /*! \brief Deformed shape presentation interface
871    *
872    * Presentation parameters of the deformed shape presentation.
873    */
874   interface DeformedShape : ScalarMap 
875   {
876     /*!
877      * Sets the scale of the presentatable object.
878      * \param theScale Double value defining the scale of this presentable object.
879      */
880     void SetScale(in double theScale);
881
882     /*!
883      * Gets the scale of the presentatable object.
884      */
885     double GetScale();
886
887     /*! This boolean method returns True if this deformed shape presentation is colored.
888      */
889     boolean IsColored();
890
891     /*! Shows this presentation in colored mode.
892      * \param theColored If this boolean parameter is True this presentable
893      *                   object will be shown in colored mode.
894      */
895     void ShowColored(in boolean theColored);
896
897     /*! Gets the color of this presentable object.
898      * \return The color of this presentable object.
899      */
900     SALOMEDS::Color GetColor();
901
902     /*! Sets the color of this presentation.
903      * \param theColor The color of this presentation. This parameter
904      *                 is taken from the <VAR>Color</VAR> enumeration.
905      */
906     void SetColor(in SALOMEDS::Color theColor);
907   };
908
909
910   //-------------------------------------------------------
911   /*! \brief Scalar Map on Deformed shape presentation interface
912    *
913    * Presentation parameters of the scalar map on deformed shape presentation.
914    */
915   interface ScalarMapOnDeformedShape : ScalarMap {
916     
917     /*!
918      * Sets the scale of the presentatable object.
919      * \param theScale Double value defining the scale of this presentable object.
920      */
921     void SetScale(in double theScale);
922
923     /*!
924      * Gets the scale of the presentatable object.
925      */
926     double GetScale();
927
928     /*!
929      * Sets the scalar field
930      * \param theEntity    - entity of scalar field
931      * \param theFieldName - the name of scalar field
932      * \param theTimeStampNumber - the timestamp number for the scalar field
933      */
934     void SetScalarField(in Entity theEntity,
935                         in string theFieldName,
936                         in long theTimeStampNumber);
937
938
939     /*!
940      * Get scalar entity
941      */
942     Entity GetScalarEntity();
943
944     /*!
945      * Get scalar field name
946      */
947     string GetScalarFieldName();
948
949     /*!
950      * Get timestamp number for the scalar field
951      */
952     long GetScalarTimeStampNumber();
953   };
954
955
956   //-------------------------------------------------------
957   /*!
958    *  \brief Plot3D interface
959    *
960    *  Presentation parameters of Plot3D presentation. This type of presentation
961    *  consists of deforming initial planar mesh according to values assigned to the mesh elements.
962    *  If mesh not planar but volumic one, it is possible to generate intermediate planar mesh.
963    */
964   interface Plot3D : ScalarMap {
965     /*!
966      *  This enumeration contains a set of elements defining
967      *  the type of orientation in 3D space of the cutting plane.
968      */
969     enum Orientation { XY,   /*!< The object is located in the plane formed by X and Y axis. */
970                        YZ,   /*!< The object is located in the plane formed by Y and Z axis. */
971                        ZX }; /*!< The object is located in the plane formed by Z and X axis. */
972
973     /*!
974      *  Sets the orientation in 3D space of cutting plane for the presentation.
975      *  \param theOrientation This parameter defines the type of orientation of cutting plane
976      *         in 3D space. It is taken from the <VAR>Orientation</VAR> enumeration.
977      *  \param theXAngle The angle of rotation of the cutting plane
978      *         around the first axis of the chosen orientation.
979      *  \param theXAngle The angle of rotation of the cutting plane
980      *         around the second axis of the chosen orientation.
981      */
982     void SetOrientation (in Orientation theOrientation, in double theXAngle, in double theYAngle);
983
984     /*!
985      *  Gets the type of orientation in 3D space of cutting plane.
986      */
987     Orientation GetOrientationType();
988
989     /*!
990      *  Gets rotation angle of the cutting plane
991      *  around the first axis of the chosen orientation.
992      */
993     double GetRotateX();
994
995     /*!
996      *  Gets rotation angle of the cutting plane
997      *  around the second axis of the chosen orientation.
998      */
999     double GetRotateY();
1000
1001     /*!
1002      *  Sets the position of a cutting plane.
1003      *  \param thePlanePosition The position of the cutting plane.
1004      *  \param theIsRelative Define, whether the input position is relative.
1005      */
1006     void SetPlanePosition (in double  thePlanePosition,
1007                            in boolean theIsRelative);
1008
1009     /*!
1010      *  Gets the position of the cutting plane
1011      */
1012     double GetPlanePosition();
1013
1014     /*!
1015      *  Returns true if a position of cutting plane is relative
1016      */
1017     boolean IsPositionRelative();
1018
1019     /*!
1020      *  Sets the scale factor for scalar values
1021      *  (how much corresponding mesh elements should be translated).
1022      *  \param theScaleFactor The scaling factor.
1023      */
1024     void SetScaleFactor (in double theScaleFactor);
1025
1026     /*!
1027      *  Gets the scale factor for scalar values.
1028      *  (how much corresponding mesh elements is translated)
1029      */
1030     double GetScaleFactor();
1031
1032     /*!
1033      *  Sets presentation type: contour or surface.
1034      *  \param theIsContourPrs Define, whether presentation type is contour.
1035      */
1036     void SetContourPrs (in boolean theIsContourPrs );
1037
1038     /*!
1039      *  Returns true if presentation type is contour.
1040      */
1041     boolean GetIsContourPrs();
1042
1043     /*!
1044      *  Sets the number of contours.
1045      *  \param theNb The number of contours.
1046      */
1047     void SetNbOfContours (in long theNb);
1048
1049     /*!
1050      *  Gets the number of contours.
1051      */
1052     long GetNbOfContours();
1053   };
1054
1055   //-------------------------------------------------------
1056   /*! \brief Cut planes interface
1057    *
1058    * Presentation parameters of Cut planes presentation. This type of presentation
1059    * consists of cutting your initial mesh by a definite number of planes. As the
1060    * result you will see these planes which will be cutted by the borders of the mesh.
1061    */
1062   interface CutPlanes : ScalarMap {
1063     /*!
1064      * This enumeration contains a set of elements defining the type of orientation in 3D space
1065      * of the cut planes.
1066      */
1067     enum Orientation {XY, /*!< The object is located in the plane formed by X and Y axis. */
1068                       YZ, /*!< The object is located in the plane formed by Y and Z axis. */
1069                       ZX}; /*!< The object is located in the plane formed by Z and X axis. */
1070
1071     /*!
1072      * Sets the type of orientation in 3D space of cut planes presentation.
1073      * \param theOrientation This parameter defines the type of orientation of cut planes
1074      *                       in 3D space. It is taken from the <VAR>Orientation</VAR> enumeration.
1075      * \param theXAngle The angle of rotation of the cut planes around
1076      *                  the first axis of the chosen orientation.
1077      * \param theXAngle The angle of rotation of the cut planes around
1078      *                  the second axis of the chosen orientation.
1079      */
1080     void SetOrientation(in Orientation theOrientation, in double theXAngle, in double theYAngle);
1081
1082     /*!
1083      * Gets the type of orientation in 3D space of cut planes presentation.
1084      */
1085     Orientation GetOrientationType();
1086
1087     /*!
1088      * Gets rotation angle of the cut plane presentation around the first axis of the chosen orientation.
1089      */
1090     double GetRotateX();
1091
1092     /*!
1093      * Gets rotation angle of the cut plane presentation around the second axis of the chosen orientation.
1094      */
1095     double GetRotateY();
1096
1097     /*!
1098      * Sets the displacement of the cut planes in 3D space.
1099      *
1100      * \param theDisp This parameter defines position of the cut planes
1101      * in 3D space. It varies from 0 to 1. If the chosen value is 0.5, the cut planes
1102      * will be evenly located regarding each other; in other words, the distance between all
1103      * of them will be equal. If the value is higher or lower than 0.5, the planes will be displaced
1104      * to one or another side.
1105      */
1106     void SetDisplacement(in double theDisp);
1107
1108     /*!
1109      * Gets the displacement of the cut planes in 3D space.
1110      */
1111     double GetDisplacement();
1112
1113     /*!
1114      * Sets the position of a definite cut plane.
1115      * \param thePlaneNumber The number of this cut plane.
1116      * \param thePlanePosition The position of this cut plane.
1117      */
1118      void SetPlanePosition(in long thePlaneNumber, in double thePlanePosition);
1119
1120     /*!
1121      * Sets the position of the choosen plane to default value.
1122      * \param thePlaneNumber The number of this cut plane.
1123      */
1124      void SetDefault(in long thePlaneNumber);
1125
1126     /*!
1127      * Gets the position of the choosen plane
1128      */
1129     double GetPlanePosition(in long thePlaneNumber);
1130
1131     /*!
1132      * Determines whether the choosen plane has default position.
1133      * \param thePlaneNumber The number of this cut plane.
1134      */
1135     boolean IsDefault(in long thePlaneNumber);
1136
1137     /*!
1138      * Sets the number of cut planes.
1139      * \param theNb The number of cut planes.
1140      */
1141     void SetNbPlanes(in long theNb);
1142
1143     /*!
1144      * Gets the number of cut planes.
1145      */
1146     long GetNbPlanes();
1147   };
1148
1149   //-------------------------------------------------------
1150   /*! \brief Cut lines presentation.
1151    *
1152    * Presentation parameters of a Cut lines presentation.
1153    * Cut Lines is a type of presentation which displays colored cells
1154    *   with applied scalar values on the mesh where lines are placed.
1155    * The procedure of construction of a Cut Lines presentation reuses the algorithm
1156    *   of creation of Cut Planes presentation and consists of two steps:
1157    *
1158    *   1. From Cut Planes presentation one plane is taken and
1159    *      it is used as base plane for construction of cut lines.
1160    *   2. This plane is cut by a regular array of planes. The result of this
1161    *      operation is a regular array of lines in space, belonging to the same plane
1162    *      and having the same orientation. They are located inside or on the mesh.
1163    */
1164   interface CutLines : ScalarMap {
1165     /*!
1166      * Sets the type of orientation in 3D space of the base plane of a cut lines presentation.
1167      * \param theOrientation The orientation of the base plane in 3D space.
1168      * \param theXAngle The angle of rotation of the base plane around
1169      *                  the first axis of the chosen orientation.
1170      * \param theXAngle The angle of rotation of the base plane around
1171      *                  the second axis of the chosen orientation.
1172      */
1173     void SetOrientation(in CutPlanes::Orientation theOrientation, in double theXAngle, in double theYAngle);
1174
1175     /*!
1176      * Sets the type of orientation in 3D space of the cutting planes of a cut lines presentation.
1177      * \param theOrientation This parameter defines the type of orientation of the cutting planes
1178      *                       in 3D space. It is taken from the <VAR>Orientation</VAR> enumeration.
1179      * \param theXAngle The angle of rotation of the cutting planes
1180      *                  around the first axis of the chosen orientation.
1181      * \param theXAngle The angle of rotation of the cutting planes
1182      *                  around the second axis of the chosen orientation.
1183      */
1184     void SetOrientation2(in CutPlanes::Orientation theOrientation, in double theXAngle, in double theYAngle);
1185
1186     /*!
1187      * Gets the type of orientation in 3D space of the base plane of a cut lines presentation.
1188      */
1189     CutPlanes::Orientation GetOrientationType();
1190
1191     /*!
1192      * Gets the type of orientation in 3D space of the cutting planes of a cut lines presentation.
1193      */
1194     CutPlanes::Orientation GetOrientationType2();
1195
1196     /*!
1197      * Gets rotation angle of the base plane around the first axis of the chosen orientation.
1198      */
1199     double GetRotateX();
1200
1201     /*!
1202      * Gets rotation angle of the cutting planes around the first axis of the chosen orientation.
1203      */
1204     double GetRotateX2();
1205
1206     /*!
1207      * Gets rotation angle of the base plane around the second axis of the chosen orientation.
1208      */
1209     double GetRotateY();
1210
1211     /*!
1212      * Gets rotation angle of the cutting planes around the second axis of the chosen orientation.
1213      */
1214     double GetRotateY2();
1215
1216     /*!
1217      * Sets the displacement of the base plane of the cut lines presentation in 3D space.
1218      *
1219      * \param theDisp This parameter defines position of the base plane
1220      * in 3D space. It varies from 0 to 1.
1221      */
1222     void SetDisplacement(in double theDisp);
1223
1224     /*!
1225      * Sets the displacement of the cutting planes of the cut lines presentation in 3D space.
1226      *
1227      * \param theDisp This parameter defines position of the cutting planes
1228      * in 3D space. It varies from 0 to 1.
1229      */
1230     void SetDisplacement2(in double theDisp);
1231
1232     /*!
1233      * Gets the displacement of the base plane of the cut lines presentation in 3D space.
1234      */
1235     double GetDisplacement();
1236
1237     /*!
1238      * Gets the displacement of the cutting planes of the cut lines presentation in 3D space.
1239      */
1240     double GetDisplacement2();
1241
1242     /*! Sets the position of the base plane in 3D space.
1243      * \param thePlanePosition A double value defining the position of the base plane in 3D space.
1244      */
1245     void SetBasePlanePosition(in double thePlanePosition);
1246
1247     /*! Gets the position of the base plane in 3D space.
1248      */
1249     double GetBasePlanePosition();
1250
1251     /*! Sets the position of one of cutting planes in 3D space.
1252      * \param thePlaneNumber A long value defining the order number of this cutting plane.
1253      * \param thePlanePosition A double value defining the position of the base plane in 3D space.
1254      */
1255     void SetLinePosition(in long thePlaneNumber, in double thePlanePosition);
1256
1257     /*! Gets the position of one of cutting planes in 3D space.
1258      * \param thePlaneNumber A long value defining the order number of this cutting plane.
1259      */
1260     double GetLinePosition(in long thePlaneNumber);
1261
1262     /*! Sets the position of the base plane to default value.
1263      */
1264     void SetDefault();
1265
1266     /*!
1267      * Determines whether the base plane has default position.
1268      * \return True if the base plane has default position.
1269      */
1270     boolean IsDefault();
1271
1272     /*!
1273      * Sets the position of the choosen cutting plane to default value.
1274      * \param thePlaneNumber The number of this cutting plane.
1275      */
1276     void SetDefaultPosition(in long thePlaneNumber);
1277
1278     /*!
1279      * Determines whether the choosen cutting plane has default position.
1280      * \param thePlaneNumber The number of this cutting plane.
1281      * \return True if this cutting plane has default position.
1282      */
1283     boolean IsDefaultPosition(in long thePlaneNumber);
1284
1285     /*!
1286      * Sets the number of cut lines.
1287      * \param theNb The number of cut lines.
1288      */
1289     void SetNbLines(in long theNb);
1290
1291     /*!
1292      * Gets the number of cut lines.
1293      */
1294     long GetNbLines();
1295
1296     /*! Invert all curves of corresponding table
1297      * \param theInvert - Invert all curves, if value is TRUE, else not.
1298      */
1299     void SetAllCurvesInverted(in boolean theInvert);
1300
1301     /*! Checks the orientation of all curves
1302      * \retval TRUE - if all curves are inverted, else FALSE
1303      */
1304     boolean IsAllCurvesInverted();
1305
1306     /*! Sets values which cutlines would be shown: aboslute or relative values
1307      * \param theAbsLength - boolean value, TRUE or false.
1308      */
1309     void SetUseAbsoluteLength(in boolean theAbsLength);
1310
1311     /*! Checks values of cutlines: using aboslute or relative values
1312      */
1313     boolean IsUseAbsoluteLength();
1314   };
1315
1316   /*! \brief Interface of the stream lines representation
1317    *
1318    * This interface contains presentation parameters of stream lines presentations.
1319    * <BR>Stream lines is a type of presentation transforming into lines the
1320    * cells with vectors having most similar direction. A stream line can be thought
1321    * of as the path that a massless particle takes in a vector field.
1322    * Streamlines are used to convey the structure of a vector field.
1323    * Usually streamlines are created to explore the most interesting features in the field.
1324    */
1325   interface StreamLines : DeformedShape {
1326     /*! This enumerations contains a set of elements necessary
1327      * for definition of direction of the stream lines.
1328      */
1329     enum Direction{ FORWARD,
1330                     BACKWARD,
1331                     BOTH
1332     };
1333
1334     /*! Sets the parameters of the stream lines presentation.
1335      * \param theIntStep Inegration step is a parameter of smoothness of the stream lines.
1336      *                   This parameter defines the accuracy of construction of the streamlines.
1337      *                   A smaller value of this parameter allows to construct smoother
1338      *                   streamlines (at the cost of more computation time).
1339      * \param thePropogationTime This parameter controls the maximum length of
1340      *                           the stream line (measured in units of time).
1341      * \param theStepLength This parameter defines the size of the output line segments
1342      *                      that make up the streamline (which is represented as a polyline).
1343      * \param thePrs3d The source presentation. The points of the field located on this source
1344      *                 presentation will serve as starting points for generation of stream lines.
1345      * \note If this parameter is not defined, your stream lines
1346      *       presentation will be generated on all points of the field.
1347      * \param thePercents This parameter defines the quantity of points of the field
1348      *                    (from 0 to 100%) which will be used as starting points for
1349      *                    construction of the stream lines. Thus, the value of this
1350      *                    parameter can vary from 0 to 1.
1351      * \param theDirection Direction of the stream lines (Forward, Backward or Both).
1352      * \return True if all parameters are properly set.
1353      */
1354     boolean SetParams(in double theIntStep,
1355                       in double thePropogationTime,
1356                       in double theStepLength,
1357                       in Prs3d thePrs3d,
1358                       in double thePercents,
1359                       in Direction theDirection);
1360
1361     /*! Gets the value of integration step of the stream lines presentation.
1362      */
1363     double GetIntegrationStep();
1364
1365     /*! Gets the value of propagation time of the stream lines presentation.
1366      */
1367     double GetPropagationTime();
1368
1369     /*! Gets the value of step length of the stream lines presentation.
1370      */
1371     double GetStepLength();
1372
1373     /*! Returns the source presentation used for generation of the stream lines.
1374      */
1375     Prs3d GetSource();
1376
1377     /*! Gets the quantity of points of the field used as starting
1378      *  points for generation of the stream lines presentation.
1379      */
1380     double GetUsedPoints();
1381
1382     /*! Returns the direction of the stream lines.
1383      */
1384     Direction GetDirection();
1385   };
1386
1387   /*! \brief Interface of the isometric surface presentation
1388    *
1389    * This interface contains presentation parameters of
1390    * isometric surface presentations.
1391    * <BR>Iso surfaces presentation combines all equal scalar
1392    * values on the cells and on the basis of them constructs
1393    * isobaric surfaces, which form this presentation.
1394    */
1395   interface IsoSurfaces : ScalarMap {
1396     /*!
1397      * Sets the number of isometric surfaces.
1398      * \param theNb A long value defining the number of isometric surfaces
1399      *              which will be used for construction of this presentation.
1400      */
1401     void SetNbSurfaces(in long theNb);
1402
1403     /*!
1404      * Gets the number of isometric surfaces
1405      */
1406     long GetNbSurfaces();
1407   };
1408
1409   //-------------------------------------------------------
1410   /*! \brief Interface of the vector presentation.
1411    *
1412    * This interface contains presentation parameters of vector presentations.
1413    */
1414   interface Vectors : DeformedShape {
1415     /*!
1416      * Sets the width of the lines of the vectors.
1417      * \param theWidth A double value defining the width of the lines of the vectors.
1418      */
1419     void SetLineWidth(in double theWidth);
1420
1421     /*!
1422      * Gets the width of the lines of the vectors.
1423      */
1424     double GetLineWidth();
1425
1426     /*!
1427      * This enumeration contains a set of elements defining the type of representation of the vector head.
1428      */
1429     enum GlyphType{ ARROW,
1430                     CONE2,
1431                     CONE6,
1432                     NONE
1433                   };
1434
1435     /*!
1436      * Sets the type of representation of the vector head.
1437      * \param theType This parameter defines the type of representation of the vector head.
1438      * This value is taken from the <VAR>GlyphType</VAR> enumeration.
1439      */
1440     void SetGlyphType(in GlyphType theType);
1441
1442     /*!
1443      * Gets the type of representation of the vector head.
1444      */
1445     GlyphType GetGlyphType();
1446
1447     /*!
1448      * This enumeration contains a set of elements defining the position of the vector head.
1449      */
1450     enum GlyphPos{ CENTER, /*!<In the center of the vector.*/
1451                    TAIL,   /*!<In the tail of the vector.*/
1452                    HEAD  /*!<In the head of the vector.*/
1453                  };
1454
1455     /*!
1456      * Sets the position of the vector head.
1457      * \param thePos This parameter defines the position of the vector head.
1458      * This value is taken from the <VAR>GlyphPos</VAR> enumeration.
1459      */
1460     void SetGlyphPos(in GlyphPos thePos);
1461
1462     /*!
1463      * Gets the position of the vector head.
1464      */
1465     GlyphPos GetGlyphPos();
1466   };
1467
1468   //-------------------------------------------------------
1469   /*! \brief %Animation class
1470    *
1471    * This class provides a set of methods used for:<br>
1472    * <ul>
1473    *     <li> generating different animations on the basis of a field,
1474    *     <li> setting the parameters of the animations,
1475    *     <li> playing these animations in the %VISU module.
1476    * </ul>
1477    * \note
1478    * <BR><B>Field</B> represents the results of calculations
1479    * (it can be scalar or vector values), grouped together under one physical concept.
1480    * <BR><B>Time stamp</B> represents a subfield: the results
1481    * of calculations are taken in one definite moment.
1482    */
1483   interface Animation : Base 
1484   {
1485     /*!
1486    * This enumeration contains a set of available animation modes.
1487    */
1488     enum AnimationMode{ PARALLEL, /*!< parallel mode of animation. */
1489                         SUCCESSIVE /*!< succcessive mode of animation. */
1490     };
1491     
1492     /*! Defines the field which will be used as a base for generation of the animation.
1493      * \param theObject The %SObject corresponding to the field.
1494      */
1495     boolean addField(in SALOMEDS::SObject theObject);
1496
1497     /*! Remove all fields from Animation object.
1498      */
1499     void clearFields();
1500
1501     /*! Generates presentations on the basis of the field.
1502      * \param theFieldNum The number of the field, which will be used
1503      *                    as the basis for construction of the presentation.
1504      */
1505     void generatePresentations(in long theFieldNum);
1506
1507     /*! Generates a set of frames from the created by the method
1508      *  <VAR>generatePresentations</VAR>3D presentations. A sequence of
1509      *  these frames will be transformed into an animation.
1510      *  \return  True, if the frames have been successfully generated.
1511      */
1512     boolean generateFrames();
1513
1514     /*! Clears the view before starting an animation.
1515      */
1516     void clearView();
1517
1518     /*! \name Playback of an animation:
1519      */
1520 /*@{*/
1521
1522     /*! Starts an animation.
1523      */
1524     void startAnimation();
1525
1526     /*! Stops an animation.
1527      */
1528     void stopAnimation();
1529
1530     /*! Forwards to the next frame.
1531      */
1532     void nextFrame();
1533
1534     /*! Returns to the previous frame.
1535      */
1536     void prevFrame();
1537
1538     /*! Returns to the first frame of the animation.
1539      */
1540     void firstFrame();
1541
1542     /*! Forwards to the last frame of the animation.
1543      */
1544     void lastFrame();
1545
1546     /*!  Passes to a definite frame of the animation.
1547      * \param theFrame A long value defining the number of the frame.
1548      */
1549     void gotoFrame(in long theFrame);
1550 /*@}*/
1551
1552     /*! Gets the number of time stamps (subfields) contained in the given field.
1553      */
1554     long getNbFields();
1555
1556     /*! Gets the number of generated frames
1557      */
1558     long getNbFrames();
1559
1560     /*! Returns True, if the animation is currently running.
1561      */
1562     boolean isRunning();
1563
1564     /*! Returns the number of the current frame.
1565      */
1566     long getCurrentFrame();
1567
1568     /*!
1569      */
1570     ColoredPrs3d getPresentation(in long theField, in long theFrame);
1571
1572     /*! Sets the type of presentation (vectors, deformed shape etc.)
1573      *  which will be generated by the method <VAR>generatePresentations</VAR>.
1574      */
1575     void setPresentationType(in long theFieldNum, in VISUType theType);
1576
1577     /*! Gets the type of presentation (vectors, deformed shape etc.) which will
1578      * be generated by the method <VAR>generatePresentations</VAR>.
1579      */
1580     VISUType getPresentationType(in long theFieldNum);
1581
1582     /*! Sets the speed of the animation.
1583      * \param theSpeed The speed of the animation. The value varies from 1 to 99.
1584      */
1585     void setSpeed(in long theSpeed);
1586
1587     /*!  Gets the speed of the animation.
1588      */
1589     long getSpeed();
1590
1591     /*! Ruturns True, if playback of the animation is proportional.
1592      * This option allows to render your animation with proportional periods
1593      * of time between every frame (not depending on the time stamps).
1594      */
1595     boolean isProportional();
1596
1597     /*! Sets the range of the animation. The range is defined on the basis of
1598      *  the time stamps of the field which have been used for generation of the animation.
1599      *  This method allows to bound the range of generated frames.
1600      *  If this method is not used, the animation will be generated
1601      *  on the basis of all time stamps contained in the field.
1602      *  \param theMin The value of the first time stamp which will be used for generation of the animation.
1603      *  \param theMax The value of the last time stamp which will be used for generation of the animation.
1604      */
1605     void setAnimationRange(in double theMin, in double theMax);
1606
1607     /*! Gets the number of the first time stamp which will be used for generation of the animation.
1608      */
1609     double getMinRange();
1610
1611     /*! Gets the number of the last time stamp which will be used for generation of the animation.
1612      */
1613     double getMaxRange();
1614
1615     /*! Returns True if the range of the animation has been defined
1616      *  by the method <VAR>setAnimationRange</VAR>. Otherwise
1617      *  the animation will be generated on the basis of all time stamps contained in the field.
1618      */
1619     boolean isRangeDefined();
1620
1621     /*! Sets the sequence of the animation. The sequence is defined on the basis of
1622      *  the time stamps of the field which have been used for generation of the animation.
1623      *  This method allows to set the sequence of generated frames.
1624      *  If this method is not used, the animation will be generated
1625      *  on the basis of all time stamps contained in the field.
1626      *  Format of the sequence: '1,9,2-5,7-8'
1627      *  \param theSequence The sequence of time stamps indices which will be used for generation of the animation.
1628      */
1629     void setAnimationSequence(in string theSequence);
1630
1631     /*! Gets the animation sequence.
1632      */
1633     string getAnimationSequence();
1634
1635     /*! Returns True if the sequence of the animation has been defined
1636      *  by the method <VAR>setAnimationSequence</VAR>. Otherwise
1637      *  the animation will be generated on the basis of all time stamps contained in the field.
1638      */
1639     boolean isSequenceDefined();
1640
1641     /*! Saves all the frames composing the animation into a definite directory.
1642      *  Pictures format is set with method <VAR>setDumpFormat()</VAR>.
1643      *  \param thePath The directory where all the frames will be saved.
1644      */
1645     void dumpTo(in string thePath);
1646
1647     /*! Set format for saving all the frames composing the animation.
1648      *  \param theFormat The format for saving pictures.
1649      *                   For available formats see QImageIO documentation (Qt).
1650      *                   If specified format is not available, default format will be used.
1651      *                   Default format is JPEG or first of supported, if JPEG is not available.
1652      *  \return Really set format. Differ from \a theFormat if \a theFormat is not available.
1653      */
1654     string setDumpFormat(in string theFormat);
1655
1656     /*! Returns True, if the playback of the animation is cycling.
1657      */
1658     boolean isCycling();
1659
1660     /*! Gets the first time stamp of the field defined at the input of the animation.
1661      * \note This method is used if animation range is <b>NOT</b> defined.
1662      */
1663     double getMinTime();
1664
1665     /*! Gets the last time stamp of the field defined at the input of the animation.
1666      * \note This method is used if animation range is <b>NOT</b> defined.
1667      */
1668     double getMaxTime();
1669
1670     /*! Sets proprtional playback of the animation. This option allows to render your animation
1671      *  with proportional periods of time between every frame (not depending on the time stamps).
1672      *  \param theProp If this boolean parameter is True, playback
1673      *                 of your animation will be set as proportional.
1674      */
1675     void setProportional(in boolean theProp);
1676
1677     /*! Sets cycling playback of the animation. The number of cycles
1678      *  can be infinite, untill you use <VAR>startAnimation</VAR> method.
1679      *  \param theCycle If this boolean parameter is True, playback
1680      *                  of your animation will be set as cycling.
1681      */
1682     void setCycling(in boolean theCycle);
1683
1684     boolean isCleaningMemoryAtEachFrame();
1685     void setCleaningMemoryAtEachFrame(in boolean theCycle);
1686
1687     SALOMEDS::SObject publishInStudy();
1688
1689     void saveAnimation();
1690
1691     void restoreFromStudy(in SALOMEDS::SObject theSObj);
1692
1693     boolean isSavedInStudy();
1694     
1695     /*!
1696      * Sets the animation mode.
1697      * \param theMode The value of this parameter is taken from the <VAR>AnimationMode</VAR> enumeration.
1698      */
1699     void setAnimationMode(in AnimationMode theMode);
1700
1701     /*!
1702      * Gets the animation mode.
1703      */
1704     AnimationMode getAnimationMode();
1705
1706     /*!
1707      * Apply the presentation properties to all fields. The exception is raised in the following cases:
1708      * 1) presentations for the given field is not yet created;
1709      * 2) invalid dynamic cast of the given presentation to VISU::ColoredPrs3d_i;
1710      * 3) the MED file is not the same;
1711      * 4) the mesh name is not the same;
1712      * 5) the field name is not the same;
1713      * 6) the entity is not the same.
1714      */
1715     void ApplyProperties(in long theFieldNum, in ColoredPrs3d thePrs)
1716       raises (SALOME::SALOME_Exception);
1717   };
1718
1719   
1720   /*! \brief Interface %Result
1721    *
1722    * This interface serves for inner representation of data generated
1723    * in other sources (MED object or file). This data is needed
1724    * for further construction of graphical presentations.
1725    */
1726   interface Result : RemovableObject, SALOME::GenericObj 
1727   {
1728     /*! Reads all data from the corresponding sources. By default the data is loaded on demand.
1729      */
1730     boolean BuildAll();
1731
1732     /*! Start to parse the source MED file and publish all its entities into the study*/
1733     boolean Build(in boolean theIsBuildAll, in boolean theIsAtOnce);
1734
1735     /*! Allow to check is all requested MED entites already loaded or not */
1736     boolean IsDone();
1737
1738     /*! Allow to check is corresponding MED entites already loaded or not */
1739     boolean IsEntitiesDone();
1740
1741     /*! Choose to parse MED fields and perform global min / max on the MED timestamps.*/
1742     void SetBuildFields(in boolean theIsBuildFields, in boolean theIsCalculateMinMax);
1743
1744     /*! Allow to check is corresponding MED fields already loaded or not */
1745     boolean IsFieldsDone();
1746
1747     /*! Choose to parse MED groups.*/
1748     void SetBuildGroups(in boolean theIsBuildGroups);
1749
1750     /*! Allow to check is corresponding MED groups and families already loaded or not */
1751     boolean IsGroupsDone();
1752
1753     /*! Allow to check is min / max calculation over field's components already perfrormed or not */
1754     boolean IsMinMaxDone();
1755
1756     /*! Allow to check is corresponding multi resolution structure already loaded or not */
1757     boolean IsPartsDone();
1758
1759     typedef sequence<Entity> Entities;
1760
1761     typedef string EntityName;
1762
1763     typedef sequence<EntityName> EntityNames;
1764
1765     typedef long TimeStampNumber;
1766
1767     typedef sequence<TimeStampNumber> TimeStampNumbers;
1768
1769     enum Resolution {
1770       FULL,
1771       MEDIUM,
1772       LOW,
1773       HIDDEN
1774     };
1775
1776     typedef sequence<Resolution> Resolutions;
1777
1778     /*! Gets existing mesh names */
1779     EntityNames GetMeshNames();
1780
1781     /*! Gets existing mesh entites for the given mesh name */
1782     Entities GetEntities(in EntityName theMeshName);
1783
1784     /*! Gets existing families for the given mesh name and entity */
1785     EntityNames GetFamilies(in EntityName theMeshName, in Entity theEntity);
1786
1787     /*! Gets existing families for the given mesh name */
1788     EntityNames GetGroups(in EntityName theMeshName);
1789
1790     /*! Gets existing fields for the given mesh name and entity */
1791     EntityNames GetFields(in EntityName theMeshName, in Entity theEntity);
1792
1793     /*! Gets number of components for the given mesh name, entity and name of field */
1794     long GetNumberOfComponents(in EntityName theMeshName, in Entity theEntity, in EntityName theFieldName);
1795
1796     /*! Gets existing numbers of time stamps for the given mesh name, entity and name of field */
1797     TimeStampNumbers GetTimeStampNumbers(in EntityName theMeshName, in Entity theEntity, in EntityName theFieldName);
1798
1799     /*! Gets existing parts of multi resolution structure for the given mesh name */
1800     EntityNames GetPartNames(in EntityName theMeshName);
1801
1802     /*! Gets available resolutions of multi resolution structure for the given mesh and part names */
1803     Resolutions GetResolutions(in EntityName theMeshName, in EntityName thePartName);
1804
1805     /*! Gets current resolution of multi resolution structure for the given mesh and part names */
1806     Resolution GetResolution(in EntityName theMeshName, in EntityName thePartName);
1807
1808     /*! Gets current resolution of multi resolution structure for the given mesh and part names */
1809     void SetResolution(in EntityName theMeshName, in EntityName thePartName, in Resolution theResolution);
1810   };
1811
1812   //-------------------------------------------------------
1813   interface ViewManager;
1814
1815   /*! \brief %VISU_Gen interface
1816    *
1817    * This is the main interface of %VISU component. It is necessary for creation of
1818    * post-processing presentations from given %Result and %Table object reference,
1819    * using the views provided by %ViewManager.
1820    */
1821   interface VISU_Gen : Engines::Component, SALOMEDS::Driver, Base 
1822   {
1823     /*! Sets a definite study to be current.
1824      */
1825     void SetCurrentStudy(in SALOMEDS::Study theStudy);
1826
1827     /*! Gets the current study.
1828      */
1829     SALOMEDS::Study GetCurrentStudy();
1830
1831     /*!
1832      * Gets the %View Manager which is used for creation of
1833      * post-processing presentations.
1834      */
1835     ViewManager GetViewManager();
1836
1837     /*!
1838      * Imports tables from a file and create TableAttribute in Sudy
1839      */
1840     SALOMEDS::SObject ImportTables(in string theFileName);
1841
1842     /*!
1843      * Export table to a file
1844      */
1845     boolean ExportTableToFile(in SALOMEDS::SObject theTable, in string theFileName);
1846
1847     /*!
1848      * Imports data from a file. The access to this file will be conserved outside of the application.
1849      * \param theFileName String parameter defining the name of the file
1850      *                    from which the data will be imported.
1851      */
1852     Result ImportFile(in string theFileName);
1853
1854     /*!
1855      * Create result and initialize its with the file. The access to this file will be conserved outside of the application.
1856      * \param theFileName String parameter defining the name of the file
1857      *                    from which the data will be imported.
1858      */
1859     Result CreateResult(in string theFileName);
1860
1861     /*!
1862      * Imports data from a file. The access to this file will closed.
1863      * \param theFileName String parameter defining the name of the file
1864      *                    from which the data will be imported.
1865      */
1866     Result CopyAndImportFile(in string theFileName);
1867
1868     /*!
1869      * Imports data from a %MED object.
1870      */
1871     Result ImportMed(in SALOMEDS::SObject theMedSObject);
1872
1873     /*!
1874      * Imports data from a %MED field.
1875      */
1876     Result ImportMedField(in SALOME_MED::FIELD theField);
1877
1878     /*!
1879      * Rename a study object, representing a mesh, specified by given values.
1880      * \param theResult   Data generated in other sources (MED object or file).
1881      * \param theMeshName One of the meshes presented in MED file.
1882      * \param theEntity   Type of entity where the field is defined.
1883      * \param theSubMeshName Name of sub-mesh (group or family).
1884      * \param theNewName  Name to be given to the study object.
1885      */
1886     void RenameEntityInStudy(in Result theResult,
1887                              in string theMeshName,
1888                              in Entity theEntity,
1889                              in string theNewName);
1890     void RenameFamilyInStudy(in Result theResult,
1891                              in string theMeshName,
1892                              in Entity theEntity,
1893                              in string theSubMeshName,
1894                              in string theNewName);
1895     void RenameGroupInStudy(in Result theResult,
1896                             in string theMeshName,
1897                             in string theSubMeshName,
1898                             in string theNewName);
1899
1900     /*!
1901      * Creates a mesh on the basis of the data generated in other sources (MED object or file).
1902      * \param theResult   Data generated in other sources. (MED object or file)
1903      * \param theMeshName  One of the meshes presented in MED file
1904      * \param theEntity Type of entity where the field is defined
1905      */
1906     Mesh MeshOnEntity(in Result theResult, in string theMeshName, in Entity theEntity);
1907
1908     /*!
1909      * Creates on the basis of a family a mesh  which will be composed of geometrical
1910      * elements, corresponding to the type of cells (node, edge, face or cell) of this family.
1911      * \param theResult   Data generated in other sources. (MED object or file)
1912      * \param theMeshName  One of the meshes presented in MED file
1913      * \param theEntity Type of entity where the field is defined.
1914      */
1915     Mesh FamilyMeshOnEntity(in Result theResult, in string theMeshName,
1916                             in Entity theEntity, in string theFamilyName);
1917
1918     /*!
1919      * Creates a mesh on the basis of a group of families.
1920      * \param theResult   Data generated in other sources. (MED object or file)
1921      * \param theMeshName  One of the meshes presented in MED file
1922      * \param theGroupName Name of the group.
1923      */
1924     Mesh GroupMesh(in Result theResult, in string theMeshName, in string theGroupName);
1925
1926     /*!
1927      * Creates a scalar map presentation.
1928      * \param theResult    Data generated in other sources. (MED object or file)
1929      * \param theMeshName  One of the meshes presented in MED file
1930      * \param theEntity    Type of entity where the field is defined
1931      * \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector.
1932      * \param theTimeStampNumber Number of iteration on the field
1933      */
1934     ScalarMap ScalarMapOnField(in Result theResult, in string theMeshName,
1935                                in Entity theEntity, in string theFieldName,
1936                                in long theTimeStampNumber);
1937
1938     /*!
1939      * Creates a Gauss Points presentation.
1940      * \param theResult    Data generated in other sources. (MED object or file)
1941      * \param theMeshName  One of the meshes presented in MED file
1942      * \param theEntity    Type of entity where the field is defined
1943      * \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector.
1944      * \param theTimeStampNumber Number of iteration on the field
1945      */
1946     GaussPoints GaussPointsOnField(in Result theResult, in string theMeshName,
1947                                    in Entity theEntity, in string theFieldName,
1948                                    in long theTimeStampNumber);
1949
1950     /*!
1951      * Creates a deformed shape presentation.
1952      * \param theResult    Data generated in other sources. (MED object or file)
1953      * \param theMeshName  One of the meshes presented in MED file
1954      * \param theEntity    Type of entity where the field is defined
1955      * \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector.
1956      * \param theTimeStampNumber Number of iteration on the field
1957      */
1958     DeformedShape DeformedShapeOnField(in Result theResult, in string theMeshName,
1959                                        in Entity theEntity, in string theFieldName,
1960                                        in long theTimeStampNumber);
1961
1962     /*!
1963      * Creates a deformed shape presentation.
1964      * \param theResult    Data generated in other sources. (MED object or file)
1965      * \param theMeshName  One of the meshes presented in MED file
1966      * \param theEntity    Type of entity where the field is defined
1967      * \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector.
1968      * \param theTimeStampNumber Number of iteration on the field
1969      */
1970     ScalarMapOnDeformedShape ScalarMapOnDeformedShapeOnField(in Result theResult, in string theMeshName,
1971                                                              in Entity theEntity, in string theFieldName,
1972                                                              in long theTimeStampNumber);
1973
1974     /*!
1975      * Creates a vector presentation.
1976      * \param theResult    Data generated in other sources. (MED object or file)
1977      * \param theMeshName  One of the meshes presented in MED file
1978      * \param theEntity    Type of entity where the field is defined
1979      * \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector.
1980      * \param theTimeStampNumber Number of iteration on the field
1981      */
1982     Vectors VectorsOnField(in Result theResult, in string theMeshName,
1983                            in Entity theEntity, in string theFieldName,
1984                            in long theTimeStampNumber);
1985
1986     /*!
1987      * Creates an iso surface presentation.
1988      * \param theResult    Data generated in other sources. (MED object or file)
1989      * \param theMeshName  One of the meshes presented in MED file
1990      * \param theEntity    Type of entity where the field is defined
1991      * \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector.
1992      * \param theTimeStampNumber Number of iteration on the field
1993      */
1994     IsoSurfaces IsoSurfacesOnField(in Result theResult, in string theMeshName,
1995                                    in Entity theEntity, in string theFieldName,
1996                                    in long theTimeStampNumber);
1997
1998     /*!
1999      * Creates an stream lines presentation.
2000      * \param theResult    Data generated in other sources. (MED object or file)
2001      * \param theMeshName  One of the meshes presented in MED file
2002      * \param theEntity    Type of entity where the field is defined
2003      * \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector.
2004      * \param theTimeStampNumber Number of iteration on the field
2005      */
2006     StreamLines StreamLinesOnField(in Result theResult, in string theMeshName,
2007                                    in Entity theEntity, in string theFieldName,
2008                                    in long theTimeStampNumber);
2009
2010     /*!
2011      * Creates a presentation of cut planes.
2012      * \param theResult    Data generated in other sources. (MED object or file)
2013      * \param theMeshName  One of the meshes presented in MED file
2014      * \param theEntity    Type of entity where the field is defined
2015      * \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector.
2016      * \param theTimeStampNumber Number of iteration on the field
2017      */
2018     CutPlanes CutPlanesOnField(in Result theResult, in string theMeshName,
2019                                in Entity theEntity, in string theFieldName,
2020                                in long theTimeStampNumber);
2021
2022     /*!
2023      * Creates a presentation of cut lines.
2024      * \param theResult    Data generated in other sources. (MED object or file)
2025      * \param theMeshName  One of the meshes presented in MED file
2026      * \param theEntity    Type of entity where the field is defined
2027      * \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector.
2028      * \param theTimeStampNumber Number of iteration on the field
2029      */
2030     CutLines CutLinesOnField(in Result theResult, in string theMeshName,
2031                              in Entity theEntity, in string theFieldName,
2032                              in long theTimeStampNumber);
2033
2034     /*!
2035      * Creates a Plot3D presentation.
2036      * \param theResult    Data generated in other sources. (MED object or file)
2037      * \param theMeshName  One of the meshes presented in MED file
2038      * \param theEntity    Type of entity where the field is defined
2039      * \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector.
2040      * \param theTimeStampNumber Number of iteration on the field
2041      */
2042     Plot3D Plot3DOnField(in Result theResult, in string theMeshName,
2043                          in Entity theEntity, in string theFieldName,
2044                          in long theTimeStampNumber);
2045
2046     /*!
2047      * Creates a table presentation.
2048      * \param theTableEntry The entry of the table which will be displayed.
2049      */
2050     Table CreateTable(in string theTableEntry);
2051
2052     /*!
2053      * Creates a curve on the basis of points, whose values are taken from the table.
2054      * \param theTable  Table containing the data for construction of curves.
2055      * \param HRow  Index of the row in the table:  abscissa of the point.
2056      * \param VRow  Index of the row in the table:  ordinate of the point.
2057      */
2058     Curve CreateCurve(in Table theTable, in long theHRow, in long theVRow);
2059     
2060     /*!
2061      * Creates a curve on the basis of points, whose values are taken from the table.
2062      * Each point has also assigned value, that will be shown as tooltip in Plot2d 
2063      * \param theTable  Table containing the data for construction of curves.
2064      * \param HRow  Index of the row in the table:  abscissa of the point.
2065      * \param VRow  Index of the row in the table:  ordinate of the point.
2066      * \param ZRow  Index of the row in the table:  assigned value (so-called as Z).
2067      */    
2068     Curve CreateCurveWithZ( in Table theTable, in long theHRow, in long theVRow, in long theZRow );
2069
2070     /*!
2071      * Creates a presentation form containing an array of references to the curves.
2072      */
2073     Container CreateContainer();
2074
2075     /*! Creates an animation in the 3D view.
2076      * \param theView3d The 3D view, where the animation will be rendered.
2077      */
2078     Animation CreateAnimation(in View3D theView3d);
2079
2080     void DeleteResult(in Result theResult);
2081
2082     void DeletePrs3d(in Prs3d thePrs3d);
2083
2084     /*!
2085      * Get or create %ColoredPrs3dCache object.
2086      */
2087     ColoredPrs3dCache GetColoredPrs3dCache(in SALOMEDS::Study theStudy);
2088   };
2089
2090   /*! \brief %View interface
2091    *
2092    * Contains a set of methods used by the %View frame, which can be one of
2093    * the following types: 3d, Table, XY plot.
2094    * %View interface is a base for all types of %view interfaces.
2095    */
2096   interface View: Base {
2097
2098     /*! \brief %ViewRepresentation enumeration
2099      *
2100      * displaying part ("ALL" isn't setable)
2101      */
2102     enum ViewRepresentation {
2103       OBJECTBROWSER,
2104       VIEWER,
2105       PYTHON,
2106       MESSAGES
2107     };
2108
2109     void ShowPart (in ViewRepresentation ViewRepr, in boolean state );
2110
2111     boolean IsPartShown( in ViewRepresentation ViewRepr );
2112
2113     /*!
2114      *  New methods for view parameters management.
2115      */
2116
2117     /*! \brief Split workarea of this view.
2118      *
2119      *  Horizontally split workarea of this view.
2120      *  This view is moved in a new right area.
2121      */
2122     void SplitRight();
2123
2124     /*! \brief Split workarea of this view.
2125      *
2126      *  Horizontally split workarea of this view.
2127      *  This view stays in an old left area, others are moved in a new right area.
2128      */
2129     void SplitLeft();
2130
2131     /*! \brief Split workarea of this view.
2132      *
2133      *  Vertically split workarea of this view.
2134      *  This view is moved in a new bottom area.
2135      */
2136     void SplitBottom();
2137
2138     /*! \brief Split workarea of this view.
2139      *
2140      *  Vertically split workarea of this view.
2141      *  This view stays in an old top area, others are moved in a new bottom area.
2142      */
2143     void SplitTop();
2144
2145     /*!
2146      *  Put this view window on top of its work area.
2147      */
2148     void OnTop();
2149
2150     /*!
2151      *  Put \a theView in workarea of this view right after it.
2152      *  If \a theView was alone in its workarea, workarea of \a theView will be destroyed.
2153      *  If \a theView was in the same workarea with this view, simple reordering will take place.
2154      *  \param theView A view window to be attracted to this one.
2155      */
2156     void Attract (in View theView);
2157
2158     /*!
2159      *  Put all the view windows from workarea of \a theView in workarea of this view right after it.
2160      *  Workarea of \a theView will be destroyed.
2161      *  If \a theView was in the same workarea with this view, simple reordering will take place.
2162      *  \param theView A view window to be attracted to this one together with all its workarea.
2163      */
2164     void AttractAll (in View theView);
2165
2166     /*!
2167      *  Set position of this view window relatively its splitter.
2168      *  \param thePosition Desired position of this view window relatively
2169      *         its splitter. Meaningfull values lays in range [0..1].
2170      *
2171      *  Direction of positioning is defined by the splitter orientation.
2172      */
2173     void SetRelativePositionInSplitter (in double thePosition);
2174
2175     /*!
2176      *  Set size of this view window relatively its splitter.
2177      *  \param theSize Desired size of this view window relatively
2178      *         its splitter. Meaningfull values lays in range [0..1].
2179      *
2180      *  Direction of resizing is defined by the splitter orientation.
2181      */
2182     void SetRelativeSizeInSplitter (in double theSize);
2183
2184     /*!
2185      *  Set horizontal position of this view window relatively its workstack.
2186      *  \param thePosition Desired horizontal position of this view window
2187      *         relatively its workstack. Meaningfull values lays in range [0..1].
2188      */
2189     void SetRelativePositionX (in double thePosition);
2190
2191     /*!
2192      *  Set vertical position of this view window relatively its workstack.
2193      *  \param thePosition Desired vertical position of this view window
2194      *         relatively its workstack. Meaningfull values lays in range [0..1].
2195      */
2196     void SetRelativePositionY (in double thePosition);
2197
2198     /*!
2199      *  Set horizontal size of this view window relatively its workstack.
2200      *  \param theSize Desired horizontal size of this view window relatively
2201      *         its workstack. Meaningfull values lays in range [0..1].
2202      */
2203     void SetRelativeSizeX (in double theSize);
2204
2205     /*!
2206      *  Set vertical size of this view window relatively its workstack.
2207      *  \param theSize Desired vertical size of this view window relatively
2208      *         its workstack. Meaningfull values lays in range [0..1].
2209      */
2210     void SetRelativeSizeY (in double theSize);
2211
2212     /*!
2213      *  Old methods for view parameters management, they don't work now
2214      */
2215     void SetViewWidth (in long Width); //setting width of view
2216     void SetViewHeight (in long Height); //setting height of view
2217     long GetViewWidth(); //getting view width
2218     long GetViewHeight(); //getting view height
2219     enum ViewPosition {TOP, CENTER, BOTTOM, RIGHT, LEFT}; //position of the study frame
2220     void SetViewPositionHorizontal (in ViewPosition ViewPosHor); //setting of the horizontal view position
2221     void SetViewPositionVertical (in ViewPosition ViewPosVer); //setting of the vertical view position
2222     void SetRelativePosition( in double x, in double y );
2223     void SetRelativeSize( in double x, in double y );
2224     void Minimize(); // Minimizes to the task bar or to the bottom of the Desktop the %View frame.
2225     void Restore(); // Restores the %View frame.
2226     void Maximize(); // Maximizes the %View frame.
2227
2228     /*!
2229      * Sets the title of the %View frame.
2230      * \param theTitle String parameter defining the title of the %View frame.
2231      */
2232     void SetTitle(in string theTitle);
2233
2234     /*!
2235      * Gets the title of the %View frame.
2236      */
2237     string GetTitle();
2238
2239     /*!
2240      * Sets background color of the %View frame.
2241      * \param theColor Background color defined in <VAR>SALOMEDS::Color</VAR> enumeration.
2242      */
2243     void SetBackground(in SALOMEDS::Color theColor);
2244
2245     /*!
2246      * Gets background color of the %View frame.
2247      */
2248     SALOMEDS::Color GetBackground();
2249
2250     /*!
2251      * Removes all presentations (presentable objects) from the %view.
2252      */
2253     void EraseAll();
2254
2255     /*!
2256      * Displays all presentations (presentable objects) in the %view.
2257      */
2258     void DisplayAll();
2259
2260     /*!
2261      * Removes a definite presentation (presentable object) from the %view.
2262      * \param thePrsObj The presentation (presentable object) which should be deleted.
2263      */
2264     void Erase(in PrsObject thePrsObj);
2265
2266     /*!
2267      * Displays a definite presentation (presentable object) in the %view.
2268      * \param thePrsObj The presentation (presentable object) which should be displayed.
2269      */
2270     void Display(in PrsObject thePrsObj);
2271
2272     /*!
2273      * Allows to display only a definite presentation (presentable object) in the %view.
2274      * All other presentations are removed from the %view.
2275      * \param thePrsObj The presentation (presentable object) which should be displayed.
2276      */
2277     void DisplayOnly(in PrsObject thePrsObj);
2278
2279     /*!
2280      * Updates the view.
2281      */
2282     void Update();
2283
2284     /*!
2285      * Saves the view.
2286      * \param theFileName The name of the file where the view will be saved.
2287      * \return True, if the view have been saved successfully.
2288      */
2289     boolean SavePicture(in string theFileName);
2290   };
2291
2292   //-------------------------------------------------------
2293   /*! \brief 3D view interface
2294    *
2295    *  This interface contains a set of methods necessary for representation of objects in 3D space.
2296    */
2297   interface View3D : View {
2298     /*!
2299      * This enumeration contains a set of elements determining a predefined point of view
2300      *  (position of the camera in 3D space relative to the presentable object).
2301      */
2302     enum ViewType{ FRONT, BACK, LEFT, RIGHT, TOP, BOTTOM};
2303
2304     /*!
2305      * This enumeration contains a set of elements determining the axis
2306      */
2307     enum Axis{ XAxis, YAxis, ZAxis};
2308
2309     /*!
2310      * Data type defining coordinates in 3D space.
2311      */
2312     typedef double XYZ[3];
2313
2314     /*!
2315      * Makes all presentations, which are currently present in the %view, completely visible.
2316      */
2317     void FitAll();
2318
2319     /*!
2320      * Sets a predefined point of view (FRONT, BACK, LEFT, RIGHT, TOP, BOTTOM). (In other words it means
2321      * a predefined position of the camera in 3D space with respect to the object which is represented.)
2322      */
2323     void SetView(in ViewType theType);
2324
2325     /*!
2326      * Sets the position of the camera in 3D space.
2327      * This point is used as the first point of the vector
2328      * defining the view direction of the camera.
2329      */
2330     void SetPointOfView(in XYZ theCoord);
2331
2332     /*!
2333      * Gets the position of the camera in 3D space.
2334      * This point is used as the first point of the vector
2335      * defining the view direction of the camera.
2336      */
2337     XYZ GetPointOfView();
2338
2339     /*!
2340      * Sets the vertical line of the camera in 3D space.
2341      */
2342     void SetViewUp(in XYZ theDir);
2343
2344     /*!
2345      * Gets the vertical line of the camera in 3D space.
2346      */
2347     XYZ GetViewUp();
2348
2349     /*!
2350      * Sets the point of sight of the camera. This point is used as the
2351      * second point of the vector defining the view direction of the camera.
2352      */
2353     void SetFocalPoint(in XYZ theDir);
2354
2355     /*!
2356      * Gets the point of sight of the camera. This point is used as the
2357      * second point of the vector defining the view direction of the camera.
2358      */
2359     XYZ GetFocalPoint();
2360
2361     /*!
2362      * Zooming of the presentable object. Sets the scale.
2363      */
2364     void SetParallelScale(in double theScale);
2365
2366     /*!
2367      * Zooming of the presentable object. Gets the scale.
2368      */
2369     double GetParallelScale();
2370
2371     /*!
2372      * Scaling of the view along a definite axis.
2373      * \param theAxis The axis of the scaling
2374      * \param theParam The coefficient of the scaling
2375      */
2376     void ScaleView(in Axis theAxis, in double theParam);
2377
2378     /*!
2379      * Removes the scaling of the view.
2380      */
2381     void RemoveScale();
2382
2383     /*!
2384      * Saves view parameters.
2385      * \return True if the view parameters have been created, False if the parameters have been modified.
2386      * \param theName The name under which the view parameters will be saved.
2387      */
2388     boolean SaveViewParams(in string theName);
2389
2390     /*! Restores view parameters.
2391      * \return True if the view parameters have been found and applied to the view,
2392      * False if the parameters with this name don't exist.
2393      * \param theName The name of the view parameters which will be restored.
2394      */
2395     boolean RestoreViewParams(in string theName);
2396
2397
2398     /*! Get representation type of the given presentation in this view.
2399      *  \param thePrs Object to get a representation type of.
2400      *  \return <VAR>PresentationType</VAR> Representation type of object in this view.
2401      */
2402     PresentationType GetPresentationType(in ScalarMap thePrs);
2403
2404     /*! Set representation type of the given presentation in this view.
2405      *  \param thePrs Object to set a representation type of.
2406      *  \param thePrsType Representation type to be set to the given object.
2407      *  \return Empty string in case of success, error description in case of failure.
2408      */
2409     string SetPresentationType(in ScalarMap thePrs, in PresentationType thePrsType);
2410
2411     /*! Get shrink state of the given presentation in this view.
2412      *  \param thePrs Object to get a shrink state of.
2413      *  \return TRUE if \a thePrs is shrinked in this view, FALSE overwise.
2414      */
2415     boolean IsShrinked(in ScalarMap thePrs);
2416
2417     /*! Make the given presentation shrinked or not shrinked in this view.
2418      *  \param thePrs Object to change a shrink state of.
2419      *  \param isShrinked Pass TRUE to make \a thePrs shrinked, FALSE overwise.
2420      *  \return Empty string in case of success, error description in case of failure.
2421      */
2422     string SetShrinked(in ScalarMap thePrs, in boolean isShrinked);
2423
2424     /*! Get shading state of the given presentation in this view.
2425      *  \param thePrs Object to get a shading state of.
2426      *  \return TRUE if \a thePrs is shaded in this view, FALSE overwise.
2427      */
2428     boolean IsShaded(in ScalarMap thePrs);
2429
2430     /*! Make the given presentation shaded or not shaded in this view.
2431      *  \param thePrs Object to set a shading state of.
2432      *  \param isShaded Pass TRUE to make \a thePrs shaded, FALSE overwise.
2433      *  \return Empty string in case of success, error description in case of failure.
2434      */
2435     string SetShaded(in ScalarMap thePrs, in boolean isShaded);
2436
2437     /*! Get opacity of the given presentation in this view.
2438      *  \param thePrs Object to get an opacity of.
2439      *  \return Opacity value in range [0, 1], 0 - transparent, 1 - opaque.
2440      */
2441     double GetOpacity(in ScalarMap thePrs);
2442
2443     /*! Set opacity of the given presentation in this view.
2444      *  \param thePrs Object to set an opacity of.
2445      *  \param theOpacity Opacity value [0, 1]. 0 - transparent, 1 - opaque.
2446      *  \return Empty string in case of success, error description in case of failure.
2447      */
2448     string SetOpacity(in ScalarMap thePrs, in double theOpacity);
2449
2450     /*! Get line width of the given presentation in this view.
2451      *  \param thePrs Object to get a line width of.
2452      *  \return Line width of \a thePrs in this view.
2453      */
2454     double GetLineWidth(in ScalarMap thePrs);
2455
2456     /*! Set line width of the given presentation in this view.
2457      *  \param thePrs Object to set a line width of.
2458      *  \param theLineWidth Line width value. Recommended values are in range [1, 10].
2459      *  \return Empty string in case of success, error description in case of failure.
2460      */
2461     string SetLineWidth(in ScalarMap thePrs, in double theLineWidth);
2462   };
2463
2464   //-------------------------------------------------------
2465   /*! \brief Interface of the Table view
2466    *
2467    * This interface is used for creation of a view necessary for presentation of a table.
2468    */
2469   interface TableView : View {
2470   };
2471
2472   //-------------------------------------------------------
2473   /*! \brief Interface of the 2D plot view
2474    *
2475    * This interface is used for creation of a view necessary for presentation
2476    * of a XY plot generated on the basis of one or several curve lines.
2477    */
2478   interface XYPlot : View {
2479     /*! Sets the title of the XY plot
2480      * \param theTitle  The title of the XY plot
2481      */
2482     void SetSubTitle(in string theTitle);
2483
2484     /*! Gets the title of the XY plot
2485      */
2486     string GetSubTitle();
2487
2488     /*!
2489      * This enumeration contains a set of elements determining the type
2490      * of the curve lines, which will be displayed in your XY plot.
2491      */
2492     enum CurveType { POINTS, MULTYLINE, SPLINE};
2493
2494     /*! Sets the type of the curve lines.
2495      * \param theType The type of the curve lines taken from <VAR>CurveType</VAR> enumeration.
2496      */
2497     void SetCurveType(in CurveType theType);
2498
2499     /*! Gets the type of the curve lines.
2500      */
2501     CurveType GetCurveType();
2502
2503     /*! Sets the size of the markers (data points) with help of
2504      * which the curve is constructed on the graphics.
2505      * \param theSize Long value defining the size of the markers.
2506      */
2507     void SetMarkerSize(in long theSize);
2508
2509     /*! Gets the size of the markers (data points) with help of
2510      * which the curve is constructed on the graphics.
2511      */
2512     long GetMarkerSize();
2513
2514     /*! Enable/disables X-axis grid of the 2D plot.
2515      */
2516     void EnableXGrid(in boolean theMajor, in long theNumMajor, in boolean theMinor, in long theNumMinor);
2517
2518     /*! Enable/disables Y-axis grid of the 2D plot.
2519      */
2520     void EnableYGrid(in boolean theMajor, in long theNumMajor, in boolean theMinor, in long theNumMinor);
2521
2522     /*! Sets horizontal scaling of the 2D plot.
2523      * \param theScaling Type of scaling taken from <VAR>Scaling</VAR> enumeration.
2524      */
2525     void SetHorScaling(in Scaling theScaling);
2526
2527     /*! Gets the type horizontal scaling of the 2D plot.
2528      */
2529     Scaling GetHorScaling();
2530
2531     /*! Sets vertical scaling of the 2D plot.
2532      * \param theScaling Type of scaling taken from <VAR>Scaling</VAR> enumeration.
2533      */
2534     void SetVerScaling(in Scaling theScaling);
2535
2536     /*! Gets the type vertical scaling of the 2D plot.
2537      */
2538     Scaling GetVerScaling();
2539
2540     /*! Sets the title of the X-axis of the plot.
2541      * \param theTitle String value defining the title of the X-axis of the plot.
2542      */
2543     void SetXTitle(in string theTitle);
2544
2545     /*! Gets the title of the X-axis of the plot.
2546      */
2547     string GetXTitle();
2548
2549     /*! Sets the title of the Y-axis of the plot.
2550      * \param theTitle String value defining the title of the X-axis of the plot.
2551      */
2552     void SetYTitle(in string theTitle);
2553
2554     /*! Gets the title of the Y-axis of the plot.
2555      */
2556     string GetYTitle();
2557
2558     /*! Shows/hides the legend (description) of the 2D plot.
2559      */
2560     void ShowLegend(in boolean theShowing);
2561
2562     /*! Shrinks and enlarges the 2D plot to fit the 2D viewer.
2563      */
2564     void FitAll();
2565
2566     /*! Set range of the 2D plot to X axis of the 2D viewer.
2567      */
2568     void FitXRange(in double xMin, in double xMax);
2569
2570     /*! Set range of the 2D plot to Y axis of the 2D viewer.
2571      */
2572     void FitYRange(in double yMin, in double yMax);
2573
2574     /*! Set range of the 2D plot to XY axis of the 2D viewer.
2575      */
2576     void FitRange(in double xMin, in double xMax,
2577                   in double yMin, in double yMax);
2578
2579     void GetFitRanges(out double xMin,out double xMax,
2580                       out double yMin,out double yMax);
2581   };
2582
2583   //-------------------------------------------------------
2584   /*! \brief Interface of the %ViewManager
2585    *
2586    * The ViewManager is necessary for work with view windows (creation and deletion).
2587    */
2588   interface ViewManager: Base {
2589     /*! \brief Getting an active %View Frame
2590      *
2591      * Returns an object reference to the active %View Frame.
2592      * Type of the %View must be checked.
2593      * \note <BR>Returns nil if there are no views currently opened.
2594      */
2595     View GetCurrentView();
2596
2597     /*! \brief Creation of a 3d %View.
2598      *
2599      * Returns an object reference to the newly created 3D %View.
2600      */
2601     View3D Create3DView();
2602
2603     /*! \brief Creation of a Table %View.
2604      *
2605      * Returns an object reference to the newly created Table %View.
2606      */
2607     TableView CreateTableView(in Table theTable);
2608
2609     /*! \brief Creation of a 2D plot %View.
2610      *
2611      * Returns an object reference to the newly created 2D plot %View.
2612      */
2613     XYPlot CreateXYPlot();
2614
2615     /*! Deletes a definite view.
2616      * \param theView The view which should be deleted.
2617      */
2618     void Destroy(in View theView);
2619   };
2620 };
2621
2622 #endif