]> SALOME platform Git repositories - modules/visu.git/blob - src/VISU_I/VISU_StreamLines_i.hh
Salome HOME
Join modifications from BR_Dev_For_4_0 tag V4_1_1.
[modules/visu.git] / src / VISU_I / VISU_StreamLines_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_StreamLines_i_HeaderFile
28 #define VISU_StreamLines_i_HeaderFile
29
30 #include "VISU_DeformedShape_i.hh"
31
32 class VISU_StreamLinesPL;
33 class vtkAppendFilter;
34
35 namespace VISU
36 {
37   //----------------------------------------------------------------------------
38   class VISU_I_EXPORT StreamLines_i : public virtual POA_VISU::StreamLines,
39                                       public virtual DeformedShape_i
40   {
41     static int myNbPresent;
42     StreamLines_i(const StreamLines_i&);
43
44   public:
45     //----------------------------------------------------------------------------
46     typedef DeformedShape_i TSuperClass;
47     typedef VISU::StreamLines TInterface;
48
49     explicit
50     StreamLines_i(EPublishInStudyMode thePublishInStudyModep);
51
52     virtual
53     void
54     SameAs(const Prs3d_i* theOriginal);
55
56     virtual
57     ~StreamLines_i();
58
59     virtual
60     VISU::VISUType GetType()
61     {
62       return VISU::TSTREAMLINES;
63     }
64
65     virtual
66     CORBA::Boolean 
67     SetParams(CORBA::Double theIntStep,
68               CORBA::Double thePropogationTime,
69               CORBA::Double theStepLength,
70               VISU::Prs3d_ptr thePrs3d,
71               CORBA::Double thePercents,
72               VISU::StreamLines::Direction theDirection);
73
74     virtual
75     CORBA::Double
76     GetIntegrationStep();
77
78     virtual
79     CORBA::Double
80     GetPropagationTime();
81
82     virtual
83     CORBA::Double
84     GetStepLength();
85
86     virtual
87     CORBA::Double
88     GetUsedPoints();
89
90     virtual
91     VISU::Prs3d_ptr
92     GetSource();
93
94     virtual
95     VISU::StreamLines::Direction 
96     GetDirection();
97
98     VISU_StreamLinesPL* 
99     GetSpecificPL() const
100     { 
101       return myStreamLinesPL; 
102     }
103     
104   protected:
105     //! Extends VISU_ColoredPrs3d_i::CreatePipeLine
106     virtual 
107     void
108     CreatePipeLine(VISU_PipeLine* thePipeLine);
109
110     //! Extends VISU_ColoredPrs3d_i::CheckIsPossible
111     virtual 
112     bool 
113     CheckIsPossible();
114
115     virtual
116     void
117     SetSource(VISU::Prs3d_ptr thePrs3d);
118
119     virtual
120     void 
121     SetSource(VISU::Prs3d_i* thePrs3d);
122
123     virtual
124     void
125     SetSource();
126
127     VISU_StreamLinesPL* myStreamLinesPL;
128     vtkAppendFilter* myAppendFilter;
129     std::string mySourceEntry;
130
131   public:
132     //! Extends VISU_ColoredPrs3d_i::IsPossible
133     static 
134     size_t
135     IsPossible(Result_i* theResult, 
136                const std::string& theMeshName, 
137                VISU::Entity theEntity,
138                const std::string& theFieldName, 
139                CORBA::Long theTimeStampNumber,
140                bool theIsMemoryCheck);
141
142     //! Extends VISU_ColoredPrs3d_i::Create
143     virtual
144     Storable* 
145     Create(const std::string& theMeshName, 
146            VISU::Entity theEntity,
147            const std::string& theFieldName, 
148            CORBA::Long theTimeStampNumber);
149
150     //! Extends VISU_ColoredPrs3d_i::ToStream
151     virtual
152     void
153     ToStream(std::ostringstream& theStr);
154
155     static const std::string myComment;
156
157     virtual
158     const char* 
159     GetComment() const;
160
161     virtual
162     QString 
163     GenerateName();
164
165     virtual
166     const char* 
167     GetIconName();
168
169     //! Extends VISU_ColoredPrs3d_i::Restore
170     virtual 
171     Storable* 
172     Restore(SALOMEDS::SObject_ptr theSObject,
173             const Storable::TRestoringMap& theMap);
174
175     //! Extends VISU_ColoredPrs3d_i::Update
176     virtual 
177     void 
178     Update();
179
180     //! Extends VISU_ColoredPrs3d_i::CreateActor
181     virtual 
182     VISU_Actor* 
183     CreateActor();
184
185     //! Extends VISU_ColoredPrs3d_i::UpdateActor
186     virtual
187     void
188     UpdateActor(VISU_Actor* theActor);
189
190     virtual
191     QString
192     GetSourceEntry() 
193     { 
194       return QString(mySourceEntry.c_str()); 
195     }
196   };
197 }
198
199 #endif