Salome HOME
Merge branch 'master' into abn/qtesting
[modules/med.git] / idl / MEDPresentationManager.idl
1 // Copyright (C) 2005-2016  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
7 //
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 // Lesser General Public License for more details.
12 //
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 //
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19
20 #ifndef __MED_PRESENTATION_MANAGER_IDL_
21 #define __MED_PRESENTATION_MANAGER_IDL_
22
23 #include "SALOME_GenericObj.idl"
24 #include "MEDDataManager.idl"
25
26 module MEDCALC
27 {
28   /* Enumerations and constants */
29
30   enum MEDPresentationViewMode {
31     VIEW_MODE_OVERLAP,
32     VIEW_MODE_REPLACE,
33     VIEW_MODE_NEW_LAYOUT,
34     VIEW_MODE_SPLIT_VIEW
35   };
36
37   enum MEDPresentationColorMap {
38     COLOR_MAP_BLUE_TO_RED_RAINBOW,
39     COLOR_MAP_COOL_TO_WARM
40   };
41
42   struct ScalarBarRange {
43     // (valMin,valMax) defines the scalar bar range from:
44     //      (-1,timetep): the field values at the chosen timestep
45     //      (-1,-1):      the field values across all timesteps
46     //      (start,end):  a user-input range of values
47     long valMin;
48     long valMax;
49   };
50
51   const string DISPLAY_EUCLIDEAN_NORM = "Euclidean norm";
52
53   enum SliceOrientation {
54     SLICE_NORMAL_TO_X,
55     SLICE_NORMAL_TO_Y,
56     SLICE_NORMAL_TO_Z,
57     SLICE_NORMAL_TO_XY,
58     SLICE_NORMAL_TO_XZ,
59     SLICE_NORMAL_TO_YZ,
60     SLICE_NORMAL_TO_XYZ
61   };
62
63   /* Default values */
64
65   const MEDPresentationViewMode VIEW_MODE_DEFAULT = VIEW_MODE_REPLACE;
66   const MEDPresentationColorMap COLOR_MAP_DEFAULT = COLOR_MAP_BLUE_TO_RED_RAINBOW;
67   //const ScalarBarRange SCALAR_BAR_RANGE_DEFAULT = ;
68   const long SCALAR_BAR_RANGE_VAL_MIN_DEFAULT = -1;
69   const long SCALAR_BAR_RANGE_VAL_MAX_DEFAULT = -1;
70   const string DISPLAY_DEFAULT = DISPLAY_EUCLIDEAN_NORM;
71   const SliceOrientation SLICE_ORIENTATION_DEFAULT = SLICE_NORMAL_TO_Z;
72   const long NB_CONTOURS_DEFAULT = 10;
73   const long NB_SLICES_DEFAULT = 1;
74
75   /* Structs */
76
77   struct ScalarMapParameters {
78     long fieldHandlerId;
79     MEDPresentationViewMode viewMode;
80     string displayedInfo; // DISPLAY_EUCLIDEAN_NORM or any field name
81     ScalarBarRange sbRange;
82     MEDPresentationColorMap colorMap;
83   };
84
85   // A contour is an isoline in 2D and an isosurface in 3D
86   struct ContourParameters {
87     long fieldHandlerId;
88     MEDPresentationViewMode viewMode;
89     string displayedInfo; // DISPLAY_EUCLIDEAN_NORM or any field name
90     ScalarBarRange sbRange;
91     MEDPresentationColorMap colorMap;
92     long nbContours;
93   };
94
95   struct VectorFieldParameters {
96     long fieldHandlerId;
97     MEDPresentationViewMode viewMode;
98   };
99
100   struct SlicesParameters {
101     long fieldHandlerId;
102     MEDPresentationViewMode viewMode;
103     SliceOrientation orientation;
104     long nbSlices;
105   };
106
107   struct DeflectionShapeParameters {
108     long fieldHandlerId;
109     MEDPresentationViewMode viewMode;
110   };
111
112   struct PointSpriteParameters {
113     long fieldHandlerId;
114     MEDPresentationViewMode viewMode;
115     string displayedInfo; // DISPLAY_EUCLIDEAN_NORM or any field name
116     ScalarBarRange sbRange;
117     MEDPresentationColorMap colorMap;
118   };
119
120   /* Functions */
121
122   interface MEDPresentationManager : SALOME::GenericObj
123   {
124
125     long makeScalarMap(in ScalarMapParameters params);
126     long makeContour(in ContourParameters params);
127     long makeVectorField(in VectorFieldParameters params);
128     long makeSlices(in SlicesParameters params);
129     long makeDeflectionShape(in DeflectionShapeParameters params);
130     long makePointSprite(in PointSpriteParameters params);
131
132     void setPresentationProperty(in long presId, in string propName, in string propValue);
133     string getPresentationProperty(in long presId, in string propName);
134
135   };
136
137 };
138
139 #endif