]> SALOME platform Git repositories - modules/visu.git/blob - src/VISU_I/VISU_CutSegment_i.hh
Salome HOME
6f7abdc26c258fce567690bbbf8e0cf3605ddb9f
[modules/visu.git] / src / VISU_I / VISU_CutSegment_i.hh
1 //  Copyright (C) 2007-2008  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 //  File   : VISU_CutSegment_i.hh
23 //  Author : Oleg UVAROV
24 //  Module : VISU
25 //
26 #ifndef VISU_CutSegment_i_HeaderFile
27 #define VISU_CutSegment_i_HeaderFile
28
29 #include "VISU_I.hxx"
30 #include "VISU_CutLinesBase_i.hh"
31
32 class VISU_CutSegmentPL;
33
34 namespace VISU
35 {
36   //----------------------------------------------------------------------------
37   class VISU_I_EXPORT CutSegment_i : public virtual POA_VISU::CutSegment,
38                                      public virtual CutLinesBase_i
39   {
40     static int myNbPresent;
41     CutSegment_i(const CutSegment_i&);
42
43   public:
44     //----------------------------------------------------------------------------
45     typedef CutLinesBase_i TSuperClass;
46     typedef VISU::CutSegment TInterface;
47
48     explicit
49     CutSegment_i(EPublishInStudyMode thePublishInStudyModep);
50
51     virtual
52     ~CutSegment_i();
53
54     virtual
55     VISU::VISUType
56     GetType() 
57     {
58       return VISU::TCUTSEGMENT;
59     }
60
61     virtual
62     void
63     SetPoint1(CORBA::Double theX,
64               CORBA::Double theY,
65               CORBA::Double theZ );
66
67     virtual
68     void
69     GetPoint1(CORBA::Double& theX,
70               CORBA::Double& theY,
71               CORBA::Double& theZ );
72
73     virtual
74     void
75     SetPoint2(CORBA::Double theX,
76               CORBA::Double theY,
77               CORBA::Double theZ );
78
79     virtual
80     void
81     GetPoint2(CORBA::Double& theX,
82               CORBA::Double& theY,
83               CORBA::Double& theZ );
84
85     VISU_CutSegmentPL* 
86     GetSpecificPL() const
87     { 
88       return myCutSegmentPL; 
89     }
90     
91   protected:
92     //! Extends VISU_ColoredPrs3d_i::CreatePipeLine
93     virtual 
94     void
95     CreatePipeLine(VISU_PipeLine* thePipeLine);
96
97     //! Extends VISU_ColoredPrs3d_i::CheckIsPossible
98     virtual 
99     bool 
100     CheckIsPossible();
101
102     virtual 
103     const char* 
104     GetIconName();
105
106     VISU_CutSegmentPL *myCutSegmentPL;
107
108   public:
109     //! Extends VISU_ColoredPrs3d_i::IsPossible
110     static
111     size_t
112     IsPossible(Result_i* theResult, 
113                const std::string& theMeshName, 
114                VISU::Entity theEntity,
115                const std::string& theFieldName, 
116                CORBA::Long theTimeStampNumber,
117                bool theIsMemoryCheck);
118
119     //! Extends VISU_ColoredPrs3d_i::Create
120     virtual 
121     Storable* 
122     Create(const std::string& theMeshName, 
123            VISU::Entity theEntity,
124            const std::string& theFieldName, 
125            CORBA::Long theTimeStampNumber);
126
127     //! Extends VISU_ColoredPrs3d_i::ToStream
128     virtual 
129     void
130     ToStream(std::ostringstream& theStr);
131
132     //! Extends VISU_ColoredPrs3d_i::Restore
133     virtual
134     Storable* 
135     Restore(SALOMEDS::SObject_ptr theSObject,
136             const Storable::TRestoringMap& theMap);
137
138     virtual 
139     void
140     SameAs(const Prs3d_i* theOrigin);
141
142     //! Extends VISU_ColoredPrs3d_i::CreateActor
143     virtual 
144     VISU_Actor* 
145     CreateActor();
146
147     static const std::string myComment;
148
149     virtual
150     const char* 
151     GetComment() const;
152
153     virtual
154     QString 
155     GenerateName();
156   };
157 }
158
159 #endif