Salome HOME
12b3021388008e8e1b82ffc9ecc3fb3875c3c5e9
[modules/visu.git] / src / VISU_I / VISU_CutSegment_i.hh
1 // Copyright (C) 2007-2011  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License.
7 //
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 // Lesser General Public License for more details.
12 //
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 //
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19
20 //  File   : VISU_CutSegment_i.hh
21 //  Author : Oleg UVAROV
22 //  Module : VISU
23 //
24 #ifndef VISU_CutSegment_i_HeaderFile
25 #define VISU_CutSegment_i_HeaderFile
26
27 #include "VISU_I.hxx"
28 #include "VISU_CutLinesBase_i.hh"
29
30 class VISU_CutSegmentPL;
31
32 namespace VISU
33 {
34   //----------------------------------------------------------------------------
35   class VISU_I_EXPORT CutSegment_i : public virtual POA_VISU::CutSegment,
36                                      public virtual CutLinesBase_i
37   {
38     static int myNbPresent;
39     CutSegment_i(const CutSegment_i&);
40
41   public:
42     //----------------------------------------------------------------------------
43     typedef CutLinesBase_i TSuperClass;
44     typedef VISU::CutSegment TInterface;
45
46     explicit
47     CutSegment_i(EPublishInStudyMode thePublishInStudyModep);
48
49     virtual
50     ~CutSegment_i();
51
52     virtual
53     VISU::VISUType
54     GetType() 
55     {
56       return VISU::TCUTSEGMENT;
57     }
58
59     virtual
60     void
61     SetPoint1(CORBA::Double theX,
62               CORBA::Double theY,
63               CORBA::Double theZ );
64
65     virtual
66     void
67     GetPoint1(CORBA::Double& theX,
68               CORBA::Double& theY,
69               CORBA::Double& theZ );
70
71     virtual
72     void
73     SetPoint2(CORBA::Double theX,
74               CORBA::Double theY,
75               CORBA::Double theZ );
76
77     virtual
78     void
79     GetPoint2(CORBA::Double& theX,
80               CORBA::Double& theY,
81               CORBA::Double& theZ );
82
83     VISU_CutSegmentPL* 
84     GetSpecificPL() const
85     { 
86       return myCutSegmentPL; 
87     }
88     
89   protected:
90     //! Extends VISU_ColoredPrs3d_i::CreatePipeLine
91     virtual 
92     void
93     CreatePipeLine(VISU_PipeLine* thePipeLine);
94
95     //! Extends VISU_ColoredPrs3d_i::CheckIsPossible
96     virtual 
97     bool 
98     CheckIsPossible();
99
100     virtual 
101     const char* 
102     GetIconName();
103
104     VISU_CutSegmentPL *myCutSegmentPL;
105
106   public:
107     //! Extends VISU_ColoredPrs3d_i::IsPossible
108     static
109     size_t
110     IsPossible(Result_i* theResult, 
111                const std::string& theMeshName, 
112                VISU::Entity theEntity,
113                const std::string& theFieldName, 
114                CORBA::Long theTimeStampNumber,
115                bool theIsMemoryCheck);
116
117     //! Extends VISU_ColoredPrs3d_i::Create
118     virtual 
119     Storable* 
120     Create(const std::string& theMeshName, 
121            VISU::Entity theEntity,
122            const std::string& theFieldName, 
123            CORBA::Long theTimeStampNumber);
124
125     //! Extends VISU_ColoredPrs3d_i::ToStream
126     virtual 
127     void
128     ToStream(std::ostringstream& theStr);
129
130     //! Extends VISU_ColoredPrs3d_i::Restore
131     virtual
132     Storable* 
133     Restore(SALOMEDS::SObject_ptr theSObject,
134             const Storable::TRestoringMap& theMap);
135
136     virtual 
137     void
138     SameAs(const Prs3d_i* theOrigin);
139
140     //! Extends VISU_ColoredPrs3d_i::CreateActor
141     virtual 
142     VISU_Actor* 
143     CreateActor();
144
145     static const std::string myComment;
146
147     virtual
148     const char* 
149     GetComment() const;
150
151     virtual
152     QString 
153     GenerateName();
154   };
155 }
156
157 #endif