Salome HOME
Fix for the "0051899: curves are not shown in opened study" issue.
[modules/visu.git] / src / VISU_I / VISU_DeformedShape_i.hh
1 // Copyright (C) 2007-2013  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
23 //  VISU OBJECT : interactive object for VISU entities implementation
24 //  File   : VISU_PrsObject_i.hxx
25 //  Author : Alexey PETROV
26 //  Module : VISU
27 //
28 #ifndef VISU_DeformedShape_i_HeaderFile
29 #define VISU_DeformedShape_i_HeaderFile
30
31 #include "VISU_I.hxx"
32 #include "VISU_MonoColorPrs_i.hh"
33
34 class VISU_DeformedShapePL;
35
36 namespace VISU
37 {
38   //----------------------------------------------------------------------------
39   class VISU_I_EXPORT DeformedShape_i : public virtual POA_VISU::DeformedShape,
40                                         public virtual MonoColorPrs_i
41   {
42     static int myNbPresent;
43     DeformedShape_i(const DeformedShape_i&);
44
45   public:
46     //----------------------------------------------------------------------------
47     typedef MonoColorPrs_i TSuperClass;
48     typedef VISU::DeformedShape TInterface;
49
50     explicit
51     DeformedShape_i(EPublishInStudyMode thePublishInStudyModep);
52
53     virtual 
54     void 
55     SameAs(const Prs3d_i* theOrigin);
56
57     virtual 
58     ~DeformedShape_i();
59
60     virtual 
61     VISU::VISUType 
62     GetType() 
63     { 
64       return VISU::TDEFORMEDSHAPE;
65     }
66
67     virtual
68     void 
69     SetScale(CORBA::Double theScale);
70
71     virtual
72     CORBA::Double 
73     GetScale();
74
75     VISU_DeformedShapePL* 
76     GetSpecificPL() const
77     { 
78       return myDeformedShapePL; 
79     }
80     
81   protected:
82     //! Redefines VISU_ColoredPrs3d_i::CreatePipeLine
83     virtual 
84     void
85     CreatePipeLine(VISU_PipeLine* thePipeLine);
86
87     //! Redefines VISU_ColoredPrs3d_i::CheckIsPossible
88     virtual 
89     bool 
90     CheckIsPossible();
91
92     VISU_DeformedShapePL *myDeformedShapePL;
93
94   public:
95     static
96     size_t
97     IsPossible(Result_i* theResult, 
98                const std::string& theMeshName, 
99                VISU::Entity theEntity,
100                const std::string& theFieldName, 
101                CORBA::Long theTimeStampNumber,
102                bool theIsMemoryCheck);
103
104     virtual 
105     Storable* 
106     Create(const std::string& theMeshName, 
107            VISU::Entity theEntity,
108            const std::string& theFieldName, 
109            CORBA::Long theTimeStampNumber);
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     const char* 
123     GetIconName();
124
125     virtual
126     void
127     ToStream(std::ostringstream& theStr);
128
129     virtual
130     Storable* 
131     Restore(SALOMEDS::SObject_ptr theSObject,
132             const Storable::TRestoringMap& theMap);
133
134     virtual
135     void
136     SetMapScale(double theMapScale = 1.0);
137
138     virtual 
139     VISU_Actor* 
140     CreateActor(bool toSupressShrinking);
141
142   };
143 }
144
145 #endif