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