]> SALOME platform Git repositories - modules/visu.git/blob - src/VISU_I/VISU_ScalarMap_i.hh
Salome HOME
Join modifications from branch BR_DEBUG_3_2_0b1
[modules/visu.git] / src / VISU_I / VISU_ScalarMap_i.hh
1 //  VISU OBJECT : interactive object for VISU entities implementation
2 //
3 //  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 //  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5 //
6 //  This library is free software; you can redistribute it and/or
7 //  modify it under the terms of the GNU Lesser General Public
8 //  License as published by the Free Software Foundation; either
9 //  version 2.1 of the License.
10 //
11 //  This library is distributed in the hope that it will be useful,
12 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
13 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14 //  Lesser General Public License for more details.
15 //
16 //  You should have received a copy of the GNU Lesser General Public
17 //  License along with this library; if not, write to the Free Software
18 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
19 //
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 //
22 //
23 //  File   : VISU_PrsObject_i.hxx
24 //  Author : Alexey PETROV
25 //  Module : VISU
26
27 #ifndef VISU_ScalarMap_i_HeaderFile
28 #define VISU_ScalarMap_i_HeaderFile
29
30 #include "VISU_ColoredPrs3d_i.hh"
31
32
33 namespace VISU
34 {
35   //============================================================================
36   class ScalarMap_i : public virtual POA_VISU::ScalarMap,
37                       public virtual ColoredPrs3d_i
38   {
39     static int myNbPresent;
40     ScalarMap_i();
41     ScalarMap_i(const ScalarMap_i&);
42
43   public:
44     //----------------------------------------------------------------------------
45     typedef ColoredPrs3d_i TSuperClass;
46
47     explicit
48     ScalarMap_i(Result_i* theResult,
49                 bool theAddToStudy);
50     explicit
51     ScalarMap_i(Result_i* theResult,
52                 SALOMEDS::SObject_ptr theSObject);
53     virtual
54     ~ScalarMap_i();
55
56     virtual
57     VISU::VISUType 
58     GetType() 
59     { 
60       return VISU::TSCALARMAP;
61     }
62
63     virtual 
64     VISU::Scaling 
65     GetScaling();
66
67     virtual
68     void
69     SetScaling(VISU::Scaling theScaling);
70
71     virtual
72     void
73     SetRange(CORBA::Double theMin, CORBA::Double theMax);
74
75     // To provide backward compatibility
76     virtual
77     void
78     SetBarOrientation(VISU::ScalarMap::Orientation theOrientation);
79
80     virtual 
81     VISU::ScalarMap::Orientation 
82     GetBarOrientation();
83
84     typedef VISU::ScalarMap TInterface;
85
86   protected:
87     virtual 
88     void
89     DoSetInput(Result_i* theResult);
90
91   public:
92     static
93     int
94     IsPossible(Result_i* theResult, 
95                const char* theMeshName, 
96                VISU::Entity theEntity,
97                const char* theFieldName, 
98                int theIteration, 
99                int isMemoryCheck = true);
100     virtual
101     Storable* 
102     Create(const char* theMeshName, 
103            VISU::Entity theEntity,
104            const char* theFieldName, 
105            int theIteration);
106
107     virtual 
108     void
109     ToStream(std::ostringstream& theStr);
110
111     static const std::string myComment;
112
113     virtual
114     const char* 
115     GetComment() const;
116
117     virtual
118     QString
119     GenerateName();
120
121     virtual 
122     Storable* 
123     Restore(const Storable::TRestoringMap& theMap);
124
125     static 
126     Storable* 
127     Restore(SALOMEDS::SObject_ptr theSObject,
128             const std::string& thePrefix, 
129             const Storable::TRestoringMap& theMap);
130
131     virtual
132     void
133     Update() ;
134
135     virtual
136     void
137     SetMapScale(double theMapScale = 1.0);
138
139     virtual
140     bool
141     IsRangeFixed();
142
143     virtual 
144     void
145     SetSourceRange();
146
147     virtual 
148     void
149     SameAs(const Prs3d_i* theOrigin);
150
151     virtual 
152     VISU_Actor* 
153     CreateActor(const Handle(SALOME_InteractiveObject)& theIO = NULL);
154
155     virtual
156     void
157     UpdateActor(VISU_Actor* theActor);
158   };
159 }
160
161 #endif