Salome HOME
Join modifications from BR_Dev_For_4_0 tag V4_1_1.
[modules/visu.git] / src / VISU_I / VISU_CutLines_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_CutLines_i_HeaderFile
28 #define VISU_CutLines_i_HeaderFile
29
30 #include "VISU_I.hxx"
31 #include "VISU_ScalarMap_i.hh"
32
33 class VISU_CutLinesPL;
34
35 namespace VISU
36 {
37   //----------------------------------------------------------------------------
38   class VISU_I_EXPORT CutLines_i : public virtual POA_VISU::CutLines,
39                      public virtual ScalarMap_i
40   {
41     static int myNbPresent;
42         CutLines_i(const CutLines_i&);
43
44   public:
45     //----------------------------------------------------------------------------
46     typedef ScalarMap_i TSuperClass;
47     typedef VISU::CutLines TInterface;
48
49     explicit
50     CutLines_i(EPublishInStudyMode thePublishInStudyModep);
51
52     virtual
53     ~CutLines_i();
54
55     virtual
56     VISU::VISUType
57     GetType() 
58     {
59       return VISU::TCUTLINES;
60     }
61
62     virtual
63     void
64     SetOrientation(VISU::CutPlanes::Orientation theOrient,
65                    CORBA::Double theXAngle, 
66                    CORBA::Double theYAngle);
67     
68     virtual
69     void
70     SetOrientation2(VISU::CutPlanes::Orientation theOrient,
71                     CORBA::Double theXAngle, 
72                     CORBA::Double theYAngle);
73
74     virtual 
75     VISU::CutPlanes::Orientation 
76     GetOrientationType();
77
78     virtual
79     VISU::CutPlanes::Orientation 
80     GetOrientationType2();
81
82     virtual 
83     CORBA::Double 
84     GetRotateX();
85
86     virtual
87     CORBA::Double 
88     GetRotateY();
89
90     virtual
91     CORBA::Double 
92     GetRotateX2();
93
94     virtual 
95     CORBA::Double 
96     GetRotateY2();
97
98     virtual
99     void 
100     SetDisplacement(CORBA::Double theDisp);
101
102     virtual
103     CORBA::Double 
104     GetDisplacement();
105
106     virtual
107     void 
108     SetDisplacement2(CORBA::Double theDisp);
109
110     virtual
111     CORBA::Double 
112     GetDisplacement2();
113
114     virtual
115     void 
116     SetBasePlanePosition(CORBA::Double thePlanePosition);
117
118     virtual
119     CORBA::Double 
120     GetBasePlanePosition();
121
122     virtual
123     void 
124     SetLinePosition(CORBA::Long thePlaneNumber, 
125                     CORBA::Double thePlanePosition);
126
127     virtual
128     CORBA::Double
129     GetLinePosition(CORBA::Long thePlaneNumber);
130
131     virtual
132     void 
133     SetDefault();
134
135     virtual 
136     CORBA::Boolean 
137     IsDefault();
138
139     virtual
140     void 
141     SetDefaultPosition(CORBA::Long thePlaneNumber);
142
143     virtual
144     CORBA::Boolean 
145     IsDefaultPosition(CORBA::Long thePlaneNumber);
146
147     virtual
148     void
149     SetAllCurvesInverted(CORBA::Boolean theInvert);
150
151     virtual
152     CORBA::Boolean
153     IsAllCurvesInverted();
154
155     virtual
156     void
157     SetCurveInverted(CORBA::Long theCurveNumber,
158                      CORBA::Boolean theInvert);
159
160     virtual
161     CORBA::Boolean
162     IsCurveInverted(CORBA::Long theCurveNumber);
163
164     virtual
165     void
166     SetUseAbsoluteLength(CORBA::Boolean theAbsLength);
167
168     virtual
169     CORBA::Boolean 
170     IsUseAbsoluteLength();
171
172     virtual 
173     void 
174     SetNbLines(CORBA::Long theNb);
175
176     virtual
177     CORBA::Long
178     GetNbLines();
179
180     typedef std::map<int,bool> TCurvesInv;
181     TCurvesInv
182     GetCurvesInverted() 
183     {
184       return myMapCurvesInverted;
185     }
186
187     void
188     CopyCurvesInverted(const TCurvesInv& theCurves);
189
190     VISU_CutLinesPL* 
191     GetSpecificPL() const
192     { 
193       return myCutLinesPL; 
194     }
195     
196   protected:
197     //! Extends VISU_ColoredPrs3d_i::CreatePipeLine
198     virtual 
199     void
200     CreatePipeLine(VISU_PipeLine* thePipeLine);
201
202     //! Extends VISU_ColoredPrs3d_i::CheckIsPossible
203     virtual 
204     bool 
205     CheckIsPossible();
206
207     virtual 
208     const char* 
209     GetIconName();
210
211     VISU_CutLinesPL *myCutLinesPL;
212     TCurvesInv myMapCurvesInverted;
213     CORBA::Boolean myUseAbsLength;
214
215   public:
216     //! Extends VISU_ColoredPrs3d_i::IsPossible
217     static
218     size_t
219     IsPossible(Result_i* theResult, 
220                const std::string& theMeshName, 
221                VISU::Entity theEntity,
222                const std::string& theFieldName, 
223                CORBA::Long theTimeStampNumber,
224                bool theIsMemoryCheck);
225
226     //! Extends VISU_ColoredPrs3d_i::Create
227     virtual 
228     Storable* 
229     Create(const std::string& theMeshName, 
230            VISU::Entity theEntity,
231            const std::string& theFieldName, 
232            CORBA::Long theTimeStampNumber);
233
234     //! Extends VISU_ColoredPrs3d_i::ToStream
235     virtual 
236     void
237     ToStream(std::ostringstream& theStr);
238
239     //! Extends VISU_ColoredPrs3d_i::Restore
240     virtual
241     Storable* 
242     Restore(SALOMEDS::SObject_ptr theSObject,
243             const Storable::TRestoringMap& theMap);
244
245     virtual 
246     void
247     SameAs(const Prs3d_i* theOrigin);
248
249     //! Extends VISU_ColoredPrs3d_i::CreateActor
250     virtual 
251     VISU_Actor* 
252     CreateActor();
253
254     void BuildTableOfReal(SALOMEDS::SObject_var theSObject);
255
256     static const std::string myComment;
257
258     virtual
259     const char* 
260     GetComment() const;
261
262     virtual
263     QString 
264     GenerateName();
265   };
266 }
267
268 #endif