]> SALOME platform Git repositories - modules/visu.git/blob - src/VISU_I/VISU_IsoSurfaces_i.hh
Salome HOME
Merge from BR_V5_DEV 16Feb09
[modules/visu.git] / src / VISU_I / VISU_IsoSurfaces_i.hh
1 //  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 //  Copyright (C) 2003-2007  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 //  VISU OBJECT : interactive object for VISU entities implementation
23 //  File   : VISU_PrsObject_i.hxx
24 //  Author : Alexey PETROV
25 //  Module : VISU
26 //
27 #ifndef VISU_IsoSurfaces_i_HeaderFile
28 #define VISU_IsoSurfaces_i_HeaderFile
29
30 #include "VISU_I.hxx"
31 //#include "VISU_ScalarMap_i.hh"
32 #include "VISU_MonoColorPrs_i.hh"
33
34 class VISU_IsoSurfacesPL;
35
36 namespace VISU
37 {
38   //----------------------------------------------------------------------------
39   class VISU_I_EXPORT IsoSurfaces_i : public virtual POA_VISU::IsoSurfaces,
40                                       public virtual MonoColorPrs_i
41   {
42     static int myNbPresent;
43     IsoSurfaces_i(const IsoSurfaces_i&);
44
45   public:
46     //----------------------------------------------------------------------------
47     typedef MonoColorPrs_i TSuperClass;
48     typedef VISU::IsoSurfaces TInterface;
49
50     explicit
51     IsoSurfaces_i(EPublishInStudyMode thePublishInStudyModep);
52
53     virtual void SameAs(const Prs3d_i* theOrigin);
54
55     virtual 
56     ~IsoSurfaces_i();
57
58     virtual
59     VISU::VISUType 
60     GetType() 
61     { 
62       return VISU::TISOSURFACES;
63     }
64
65     virtual
66     void
67     SetNbSurfaces(CORBA::Long theNb);
68
69     virtual
70     CORBA::Long 
71     GetNbSurfaces();
72
73     virtual 
74     void
75     SetSubRange(CORBA::Double theMin, CORBA::Double theMax);
76
77     virtual
78     CORBA::Double 
79     GetSubMin();
80
81     virtual
82     CORBA::Double 
83     GetSubMax();
84
85     VISU_IsoSurfacesPL* 
86     GetSpecificPL() const
87     { 
88       return myIsoSurfacesPL; 
89     }
90
91
92     virtual CORBA::Boolean IsLabeled();
93     virtual void ShowLabels(CORBA::Boolean theShow, CORBA::Long theNb);
94
95     virtual CORBA::Long GetNbLabels();
96     
97
98   protected:
99     //! Redefines VISU_ColoredPrs3d_i::CreatePipeLine
100     virtual 
101     void 
102     CreatePipeLine(VISU_PipeLine* thePipeLine);
103
104     //! Redefines VISU_ScalarMap_i::DoSetInput
105     virtual 
106     void
107     DoSetInput(bool theIsInitilizePipe, bool theReInit);
108
109     //! Redefines VISU_ScalarMap_i::CheckIsPossible
110     virtual 
111     bool 
112     CheckIsPossible();
113
114     VISU_IsoSurfacesPL* myIsoSurfacesPL;
115
116     bool myIsLabeled;
117     CORBA::Long myNbLabels;
118
119   public:
120     static
121     size_t
122     IsPossible(Result_i* theResult, 
123                const std::string& theMeshName, 
124                VISU::Entity theEntity,
125                const std::string& theFieldName, 
126                CORBA::Long theTimeStampNumber,
127                bool theIsMemoryCheck);
128
129     virtual
130     Storable* 
131     Create(const std::string& theMeshName, 
132            VISU::Entity theEntity,
133            const std::string& theFieldName, 
134            CORBA::Long theTimeStampNumber);
135
136     static const std::string myComment;
137
138     virtual 
139     const char* 
140     GetComment() const;
141
142     virtual
143     QString
144     GenerateName();
145
146     virtual
147     const char* 
148     GetIconName();
149
150     virtual
151     void
152     ToStream(std::ostringstream& theStr);
153
154     virtual
155     Storable* 
156     Restore(SALOMEDS::SObject_ptr theSObject,
157             const Storable::TRestoringMap& theMap);
158
159     virtual 
160     VISU_Actor* 
161     CreateActor();
162     
163     virtual 
164     void 
165     SetMapScale(double theMapScale = 1.0);
166
167     virtual void UpdateActor(VISU_ActorBase* theActor);
168     
169   };
170 }
171
172 #endif