]> SALOME platform Git repositories - modules/visu.git/blob - src/VISU_I/VISU_Mesh_i.hh
Salome HOME
Join modifications from BR_Dev_For_4_0 tag V4_1_1.
[modules/visu.git] / src / VISU_I / VISU_Mesh_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_Mesh_i_HeaderFile
28 #define VISU_Mesh_i_HeaderFile
29
30 #include "VISU_Prs3d_i.hh"
31
32 class VISU_MeshPL;
33
34 namespace VISU
35 {
36   class VISU_I_EXPORT Mesh_i : public virtual POA_VISU::Mesh,
37                  public virtual Prs3d_i
38   {
39     static int myNbPresent;
40     Mesh_i(const Mesh_i&);
41
42   public:
43     typedef Prs3d_i TSuperClass;
44     typedef VISU::Mesh TInterface;
45
46     Mesh_i();
47
48     virtual
49     ~Mesh_i();
50
51     virtual
52     void
53     SameAs(const Prs3d_i* theOrigin);
54
55     virtual
56     void
57     RemoveFromStudy();
58
59     virtual
60     VISU::VISUType 
61     GetType() 
62     { 
63       return VISU::TMESH;
64     }
65
66     virtual 
67     void 
68     SetCellColor(const SALOMEDS::Color& theColor);
69
70     virtual 
71     SALOMEDS::Color 
72     GetCellColor();
73
74     virtual 
75     void 
76     SetNodeColor(const SALOMEDS::Color& theColor);
77
78     virtual 
79     SALOMEDS::Color 
80     GetNodeColor();
81
82     virtual 
83     void 
84     SetLinkColor(const SALOMEDS::Color& theColor);
85
86     virtual 
87     SALOMEDS::Color 
88     GetLinkColor();
89
90     virtual 
91     void
92     SetPresentationType(VISU::PresentationType theType);
93
94     virtual
95     VISU::PresentationType 
96     GetPresentationType();
97
98     VISU_MeshPL* GetSpecificPL() const
99     { 
100       return myMeshPL;
101     }
102
103   protected:
104     Storable* 
105     Build(int theRestoring);
106
107     VISU_MeshPL* myMeshPL;
108
109     int myEntity;//jfa IPAL9284: TEntity myEntity;
110     std::string mySubMeshName;
111     VISU::VISUType myType;
112
113     VISU::PresentationType myPresentType;
114     SALOMEDS::Color myCellColor;
115     SALOMEDS::Color myNodeColor;
116     SALOMEDS::Color myLinkColor;
117
118   public:
119     static 
120     size_t
121     IsPossible(VISU::Result_i* theResult, 
122                const std::string& theMeshName,
123                VISU::Entity theEntity, 
124                const std::string& theFamilyName = "");
125     virtual 
126     Storable* 
127     Create(VISU::Result_i* theResult, 
128            const std::string& theMeshName, 
129            VISU::Entity theEntity, 
130            const std::string& theFamilyName = "");
131
132     static 
133     size_t
134     IsPossible(VISU::Result_i* theResult, 
135                const std::string& theMeshName, 
136                const std::string& theGroupName);
137     virtual 
138     Storable* 
139     Create(VISU::Result_i* theResult, 
140            const std::string& theMeshName, 
141            const std::string& theGroupName);
142
143     VISU::Entity
144     GetEntity() const;
145
146     const std::string& 
147     GetSubMeshName() const;
148
149     virtual
150     void
151     ToStream(std::ostringstream& theStr);
152
153     virtual
154     const char* 
155     GetComment() const;
156
157     static const std::string myComment;
158
159     virtual
160     QString
161     GenerateName();
162
163     virtual
164     Storable* 
165     Restore(SALOMEDS::SObject_ptr theSObject,
166             const Storable::TRestoringMap& theMap);
167
168     static 
169     Storable* 
170     StorableEngine(SALOMEDS::SObject_ptr theSObject,
171                    const Storable::TRestoringMap& theMap,
172                    const std::string& thePrefix,
173                    CORBA::Boolean theIsMultiFile);
174     
175     virtual
176     VISU_Actor* 
177     CreateActor();
178
179     virtual
180     void 
181     UpdateActor(VISU_Actor* theActor);
182   };
183 }
184
185 #endif