1 // Copyright (C) 2005-2016 CEA/DEN, EDF R&D, OPEN CASCADE
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.
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.
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
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 #ifndef __MED_PRESENTATION_MANAGER_IDL_
21 #define __MED_PRESENTATION_MANAGER_IDL_
23 #include "SALOME_GenericObj.idl"
24 #include "MEDDataManager.idl"
28 /* Enumerations and constants */
30 enum MEDPresentationViewMode {
37 enum MEDPresentationColorMap {
38 COLOR_MAP_BLUE_TO_RED_RAINBOW,
39 COLOR_MAP_COOL_TO_WARM
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
51 const string DISPLAY_EUCLIDEAN_NORM = "Euclidean norm";
53 enum SliceOrientation {
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;
77 struct ScalarMapParameters {
79 MEDPresentationViewMode viewMode;
80 string displayedInfo; // DISPLAY_EUCLIDEAN_NORM or any field name
81 ScalarBarRange sbRange;
82 MEDPresentationColorMap colorMap;
85 // A contour is an isoline in 2D and an isosurface in 3D
86 struct ContourParameters {
88 MEDPresentationViewMode viewMode;
89 string displayedInfo; // DISPLAY_EUCLIDEAN_NORM or any field name
90 ScalarBarRange sbRange;
91 MEDPresentationColorMap colorMap;
95 struct VectorFieldParameters {
97 MEDPresentationViewMode viewMode;
100 struct SlicesParameters {
102 MEDPresentationViewMode viewMode;
103 SliceOrientation orientation;
107 struct DeflectionShapeParameters {
109 MEDPresentationViewMode viewMode;
112 struct PointSpriteParameters {
114 MEDPresentationViewMode viewMode;
115 string displayedInfo; // DISPLAY_EUCLIDEAN_NORM or any field name
116 ScalarBarRange sbRange;
117 MEDPresentationColorMap colorMap;
122 interface MEDPresentationManager : SALOME::GenericObj
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);
132 void setPresentationProperty(in long presId, in string propName, in string propValue);
133 string getPresentationProperty(in long presId, in string propName);
135 void updateScalarMap(in long presId, in ScalarMapParameters params);
136 void updateContour(in long presId, in ContourParameters params);
137 void updateVectorField(in long presId, in VectorFieldParameters params);
138 void updateSlices(in long presId, in SlicesParameters params);
139 void updateDeflectionShape(in long presId, in DeflectionShapeParameters params);
140 void updatePointSprite(in long presId, in PointSpriteParameters params);
142 boolean removePresentation(in long presId);