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