Salome HOME
Merge from V5_1_main 14/05/2010
[modules/visu.git] / src / VISU_I / VISU_CutPlanes_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_CutPlanes_i_HeaderFile
29 #define VISU_CutPlanes_i_HeaderFile
30
31 #include "VISU_ScalarMap_i.hh"
32 #include "VISU_OptionalDeformation_i.hh"
33
34 class VISU_CutPlanesPL;
35
36 namespace VISU
37 {
38   //----------------------------------------------------------------------------
39   class VISU_I_EXPORT CutPlanes_i : public virtual POA_VISU::CutPlanes,
40                                     public virtual ScalarMap_i,
41                                     public virtual OptionalDeformation_i
42   {
43     static int myNbPresent;
44     CutPlanes_i(const CutPlanes_i&);
45
46   public:
47     //----------------------------------------------------------------------------
48     typedef ScalarMap_i TSuperClass;
49     typedef VISU::CutPlanes TInterface;
50
51     explicit
52     CutPlanes_i(EPublishInStudyMode thePublishInStudyModep);
53
54     virtual
55     ~CutPlanes_i();
56
57     virtual
58     VISU::VISUType 
59     GetType() 
60     { 
61       return VISU::TCUTPLANES;
62     }
63
64     virtual
65     void
66     SetOrientation(VISU::CutPlanes::Orientation theOrient,
67                    CORBA::Double theXAngle, 
68                    CORBA::Double theYAngle);
69
70     virtual 
71     VISU::CutPlanes::Orientation 
72     GetOrientationType();
73
74     virtual
75     CORBA::Double
76     GetRotateX();
77
78     virtual
79     CORBA::Double
80     GetRotateY();
81
82     virtual
83     void
84     SetDisplacement(CORBA::Double theDisp);
85
86     virtual
87     CORBA::Double
88     GetDisplacement();
89
90     virtual
91     void
92     SetPlanePosition(CORBA::Long thePlaneNumber, 
93                      CORBA::Double thePlanePosition);
94     virtual 
95     CORBA::Double 
96     GetPlanePosition(CORBA::Long thePlaneNumber);
97
98     virtual
99     void
100     SetDefault(CORBA::Long thePlaneNumber);
101
102     virtual
103     CORBA::Boolean 
104     IsDefault(CORBA::Long thePlaneNumber);
105
106     virtual
107     void
108     SetNbPlanes(CORBA::Long theNb);
109
110     virtual
111     CORBA::Long
112     GetNbPlanes();
113
114     VISU_CutPlanesPL* 
115     GetSpecificPL() const
116     { 
117       return myCutPlanesPL; 
118     }
119     
120   protected:
121     //! Redefines VISU_ColoredPrs3d_i::CreatePipeLine
122     virtual
123     void
124     CreatePipeLine(VISU_PipeLine* thePipeLine);
125
126     //! Redefines VISU_ColoredPrs3d_i::CheckIsPossible
127     virtual 
128     bool 
129     CheckIsPossible();
130
131     VISU_CutPlanesPL *myCutPlanesPL;
132
133   public:
134     //! Redefines VISU_ColoredPrs3d_i::IsPossible
135     static
136     size_t
137     IsPossible(Result_i* theResult, 
138                const std::string& theMeshName, 
139                VISU::Entity theEntity,
140                const std::string& theFieldName, 
141                CORBA::Long theTimeStampNumber,
142                bool theIsMemoryCheck);
143
144     //! Redefines VISU_ColoredPrs3d_i::Create
145     virtual 
146     Storable* 
147     Create(const std::string& theMeshName, 
148            VISU::Entity theEntity,
149            const std::string& theFieldName, 
150            CORBA::Long theTimeStampNumber);
151
152     //! Redefines VISU_ColoredPrs3d_i::ToStream
153     virtual
154     void
155     ToStream(std::ostringstream& theStr);
156
157     //! Redefines VISU_ColoredPrs3d_i::Restore
158     virtual
159     Storable* 
160     Restore(SALOMEDS::SObject_ptr theSObject,
161             const Storable::TRestoringMap& theMap);
162
163     virtual 
164     void
165     SameAs(const Prs3d_i* theOrigin);
166
167     //! Redefines VISU_ColoredPrs3d_i::CreateActor
168     virtual 
169     VISU_Actor* 
170     CreateActor();
171
172     static const std::string myComment;
173
174     //! Redefines VISU_ColoredPrs3d_i::GetComment
175     virtual 
176     const char* 
177     GetComment() const;
178
179     //! Redefines VISU_ColoredPrs3d_i::GenerateName
180     virtual
181     QString
182     GenerateName();
183
184     virtual
185     const char* 
186     GetIconName();
187   };
188 }
189
190 #endif