Salome HOME
Merge from V5_1_main 14/05/2010
[modules/visu.git] / src / VISU_I / VISU_Deformation_i.hh
1 //  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
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.
7 //
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.
12 //
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
16 //
17 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19
20 //  File   : VISU_Deformation_i.hxx
21 //  Author : 
22 //  Module : VISU
23 //
24 #ifndef VISU_Deformation_i_HeaderFile
25 #define VISU_Deformation_i_HeaderFile
26
27 #include "VISU_I.hxx"
28 #include "VISU_ColoredPrs3d_i.hh"
29 #include "VISU_DeformationPL.hxx"
30
31
32
33 namespace VISU{
34
35   class VISU_I_EXPORT Deformation_i : public virtual POA_VISU::Deformation
36   {
37     Deformation_i(const Deformation_i&);
38   public:
39     typedef VISU::Deformation TInterface;
40
41     Deformation_i(VISU::ColoredPrs3d_i* theColoredPrs3d);
42     virtual ~Deformation_i();
43
44     virtual 
45     void
46     SetScale(CORBA::Double theScale);
47
48     virtual
49     CORBA::Double 
50     GetScale();
51
52     virtual
53     void
54     DeformationToStream(std::ostringstream& theStr);
55
56     virtual
57     void
58     RestoreDeformation(SALOMEDS::SObject_ptr theSObject,
59             const Storable::TRestoringMap& theMap);
60
61     virtual 
62     void 
63     SameAsDeformation(const Deformation_i *aDeformedPrs);
64
65     virtual
66     VISU::Entity
67     GetVectorialFieldEntity();
68
69     virtual
70     char* 
71     GetVectorialFieldName();
72
73     virtual void SetVectorialField(Entity theEntity, const char* theFieldName);
74
75   protected:
76     virtual
77     void
78     InitDeformedPipeLine(VISU_DeformationPL* theDeformedPipeLine);
79
80     VISU_DeformationPL*
81     GetSpecificDeformedPL() const
82     { 
83       return myDeformationPL; 
84     }
85
86     ColoredPrs3d_i* GetColoredPrs3d(){
87       return myColoredPrs3d;
88     }
89     
90     
91   private:
92     VISU_DeformationPL *myDeformationPL;
93
94     PField myVectorialField;
95     VISU::Entity myVectorialEntity;
96     std::string myVectorialFieldName;
97     ColoredPrs3d_i *myColoredPrs3d;
98     
99   };
100 }
101
102 #endif