Salome HOME
Merge from PortingMED3 07Apr11
[modules/visu.git] / src / VISU_I / VISU_CutLines_i.hh
1 //  Copyright (C) 2007-2010  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_CutLines_i_HeaderFile
29 #define VISU_CutLines_i_HeaderFile
30
31 #include "VISU_I.hxx"
32 #include "VISU_CutLinesBase_i.hh"
33
34 class VISU_CutLinesPL;
35
36 namespace VISU
37 {
38   //----------------------------------------------------------------------------
39   class VISU_I_EXPORT CutLines_i : public virtual POA_VISU::CutLines,
40                                    public virtual CutLinesBase_i
41   {
42     static int myNbPresent;
43     CutLines_i(const CutLines_i&);
44
45   public:
46     //----------------------------------------------------------------------------
47     typedef CutLinesBase_i TSuperClass;
48     typedef VISU::CutLines TInterface;
49
50     explicit
51     CutLines_i(EPublishInStudyMode thePublishInStudyModep);
52
53     virtual
54     ~CutLines_i();
55
56     virtual
57     VISU::VISUType
58     GetType() 
59     {
60       return VISU::TCUTLINES;
61     }
62
63     virtual
64     void
65     SetOrientation(VISU::CutPlanes::Orientation theOrient,
66                    CORBA::Double theXAngle, 
67                    CORBA::Double theYAngle);
68     
69     virtual
70     void
71     SetOrientation2(VISU::CutPlanes::Orientation theOrient,
72                     CORBA::Double theXAngle, 
73                     CORBA::Double theYAngle);
74
75     virtual 
76     VISU::CutPlanes::Orientation 
77     GetOrientationType();
78
79     virtual
80     VISU::CutPlanes::Orientation 
81     GetOrientationType2();
82
83     virtual 
84     CORBA::Double 
85     GetRotateX();
86
87     virtual
88     CORBA::Double 
89     GetRotateY();
90
91     virtual
92     CORBA::Double 
93     GetRotateX2();
94
95     virtual 
96     CORBA::Double 
97     GetRotateY2();
98
99     virtual
100     void 
101     SetDisplacement(CORBA::Double theDisp);
102
103     virtual
104     CORBA::Double 
105     GetDisplacement();
106
107     virtual
108     void 
109     SetDisplacement2(CORBA::Double theDisp);
110
111     virtual
112     CORBA::Double 
113     GetDisplacement2();
114
115     virtual
116     void 
117     SetBasePlanePosition(CORBA::Double thePlanePosition);
118
119     virtual
120     CORBA::Double 
121     GetBasePlanePosition();
122
123     virtual
124     void 
125     SetLinePosition(CORBA::Long thePlaneNumber, 
126                     CORBA::Double thePlanePosition);
127
128     virtual
129     CORBA::Double
130     GetLinePosition(CORBA::Long thePlaneNumber);
131
132     virtual
133     void 
134     SetDefault();
135
136     virtual 
137     CORBA::Boolean 
138     IsDefault();
139
140     virtual
141     void 
142     SetDefaultPosition(CORBA::Long thePlaneNumber);
143
144     virtual
145     CORBA::Boolean 
146     IsDefaultPosition(CORBA::Long thePlaneNumber);
147
148     VISU_CutLinesPL* 
149     GetSpecificPL() const
150     { 
151       return myCutLinesPL; 
152     }
153     
154   protected:
155     //! Extends VISU_ColoredPrs3d_i::CreatePipeLine
156     virtual 
157     void
158     CreatePipeLine(VISU_PipeLine* thePipeLine);
159
160     //! Extends VISU_ColoredPrs3d_i::CheckIsPossible
161     virtual 
162     bool 
163     CheckIsPossible();
164
165     virtual 
166     const char* 
167     GetIconName();
168
169     VISU_CutLinesPL *myCutLinesPL;
170
171   public:
172     //! Extends VISU_ColoredPrs3d_i::IsPossible
173     static
174     size_t
175     IsPossible(Result_i* theResult, 
176                const std::string& theMeshName, 
177                VISU::Entity theEntity,
178                const std::string& theFieldName, 
179                CORBA::Long theTimeStampNumber,
180                bool theIsMemoryCheck);
181
182     //! Extends VISU_ColoredPrs3d_i::Create
183     virtual 
184     Storable* 
185     Create(const std::string& theMeshName, 
186            VISU::Entity theEntity,
187            const std::string& theFieldName, 
188            CORBA::Long theTimeStampNumber);
189
190     //! Extends VISU_ColoredPrs3d_i::ToStream
191     virtual 
192     void
193     ToStream(std::ostringstream& theStr);
194
195     //! Extends VISU_ColoredPrs3d_i::Restore
196     virtual
197     Storable* 
198     Restore(SALOMEDS::SObject_ptr theSObject,
199             const Storable::TRestoringMap& theMap);
200
201     virtual 
202     void
203     SameAs(const Prs3d_i* theOrigin);
204
205     //! Extends VISU_ColoredPrs3d_i::CreateActor
206     virtual 
207     VISU_Actor* 
208     CreateActor();
209
210     static const std::string myComment;
211
212     virtual
213     const char* 
214     GetComment() const;
215
216     virtual
217     QString 
218     GenerateName();
219   };
220 }
221
222 #endif