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 enum MEDPresentationScalarBarRange {
43 SCALAR_BAR_ALL_TIMESTEPS,
44 SCALAR_BAR_CURRENT_TIMESTEP
47 enum MEDPresentationMeshMode {
49 MESH_MODE_SURFACE_EDGES,
55 // struct ScalarBarRange {
56 // // (valMin,valMax) defines the scalar bar range from:
57 // // (-1,timestep): the field values at the chosen timestep
58 // // (-1,-1): the field values across all timesteps
59 // // (-2,-2): the field values at current timestep
60 // // (start,end): a user-input range of values
65 const string DISPLAY_EUCLIDEAN_NORM = ""; // Void string to avoid clash with a real component name -- never used actually?
67 enum MEDPresentationSliceOrientation {
79 const MEDPresentationViewMode VIEW_MODE_DEFAULT = VIEW_MODE_REPLACE;
80 const MEDPresentationColorMap COLOR_MAP_DEFAULT = COLOR_MAP_BLUE_TO_RED_RAINBOW;
81 const MEDPresentationScalarBarRange SCALAR_BAR_RANGE_DEFAULT = SCALAR_BAR_ALL_TIMESTEPS;
82 const MEDPresentationMeshMode MESH_MODE_DEFAULT = MESH_MODE_WIREFRAME;
83 // const long SCALAR_BAR_RANGE_VAL_MIN_DEFAULT = -1;
84 // const long SCALAR_BAR_RANGE_VAL_MAX_DEFAULT = -1;
85 const string DISPLAY_DEFAULT = DISPLAY_EUCLIDEAN_NORM;
86 const MEDPresentationSliceOrientation SLICE_ORIENTATION_DEFAULT = SLICE_NORMAL_TO_X;
87 const long NB_CONTOURS_DEFAULT = 10;
88 const long NB_SLICES_DEFAULT = 1;
92 // Just showing the mesh
93 struct MeshViewParameters {
94 long fieldHandlerId; // TODO should be a meshHandlerId really ...
95 MEDPresentationMeshMode mode;
98 // A simple scalar map
99 struct ScalarMapParameters {
101 string displayedComponent; // DISPLAY_EUCLIDEAN_NORM or any component name
102 MEDPresentationScalarBarRange scalarBarRange;
103 MEDPresentationColorMap colorMap;
106 // A contour is an isoline in 2D and an isosurface in 3D
107 struct ContourParameters { // Contour are only for scalar fields
109 MEDPresentationScalarBarRange scalarBarRange;
110 MEDPresentationColorMap colorMap;
114 // struct VectorFieldParameters {
115 // long fieldHandlerId;
116 // string displayedComponent; // DISPLAY_EUCLIDEAN_NORM or any component name
117 // MEDPresentationScalarBarRange scalarBarRange;
118 // MEDPresentationColorMap colorMap;
121 struct SlicesParameters {
123 string displayedComponent; // DISPLAY_EUCLIDEAN_NORM or any component name
124 MEDPresentationScalarBarRange scalarBarRange;
125 MEDPresentationColorMap colorMap;
126 MEDPresentationSliceOrientation orientation;
130 // struct DeflectionShapeParameters {
131 // long fieldHandlerId;
134 // struct PointSpriteParameters {
135 // long fieldHandlerId;
136 // string displayedComponent; // DISPLAY_EUCLIDEAN_NORM or any component name
137 // MEDPresentationScalarBarRange scalarBarRange;
138 // MEDPresentationColorMap colorMap;
141 typedef sequence<long> PresentationsList;
145 interface MEDPresentationManager : SALOME::GenericObj
147 long makeMeshView(in MeshViewParameters params, in MEDPresentationViewMode viewMode);
148 long makeScalarMap(in ScalarMapParameters params, in MEDPresentationViewMode viewMode);
149 long makeContour(in ContourParameters params, in MEDPresentationViewMode viewMode)
150 raises (SALOME::SALOME_Exception);
151 // long makeVectorField(in VectorFieldParameters params, in MEDPresentationViewMode viewMode);
152 long makeSlices(in SlicesParameters params, in MEDPresentationViewMode viewMode);
153 // long makeDeflectionShape(in DeflectionShapeParameters params, in MEDPresentationViewMode viewMode);
154 // long makePointSprite(in PointSpriteParameters params, in MEDPresentationViewMode viewMode);
156 void setPresentationStringProperty(in long presId, in string propName, in string propValue);
157 string getPresentationStringProperty(in long presId, in string propName);
158 void setPresentationIntProperty(in long presId, in string propName, in long propValue);
159 long getPresentationIntProperty(in long presId, in string propName);
161 MeshViewParameters getMeshViewParameters(in long presId);
162 ScalarMapParameters getScalarMapParameters(in long presId);
163 ContourParameters getContourParameters(in long presId);
164 SlicesParameters getSlicesParameters(in long presId);
166 void updateMeshView(in long presId, in MeshViewParameters params);
167 void updateScalarMap(in long presId, in ScalarMapParameters params);
168 void updateContour(in long presId, in ContourParameters params);
169 // void updateVectorField(in long presId, in VectorFieldParameters params);
170 void updateSlices(in long presId, in SlicesParameters params);
171 // void updateDeflectionShape(in long presId, in DeflectionShapeParameters params);
172 // void updatePointSprite(in long presId, in PointSpriteParameters params);
174 boolean removePresentation(in long presId);
176 // Helper function to keep GUI sync
177 boolean activateView(in long presentationId);
179 // Low level ParaVis dump
180 string getParavisDump(in long presId);
182 // MEDPresentationViewMode getPresentationViewMode(in long presId);
184 PresentationsList getAllPresentations();