]> SALOME platform Git repositories - modules/visu.git/blob - src/PIPELINE/VISU_StreamLinesPL.hxx
Salome HOME
Join modifications from branch OCC_debug_for_3_2_0b1
[modules/visu.git] / src / PIPELINE / VISU_StreamLinesPL.hxx
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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
21 //
22 //
23 // File:    VISU_PipeLine.hxx
24 // Author:  Alexey PETROV
25 // Module : VISU
26
27 #ifndef VISU_StreamLinesPL_HeaderFile
28 #define VISU_StreamLinesPL_HeaderFile
29
30 #include "VISU_DeformedShapePL.hxx"
31 #include <vtkStreamLine.h>
32
33 using namespace std;
34
35 class vtkPointSet;
36 class vtkCellCenters;
37 class VTKViewer_GeometryFilter;
38 class VISU_UsedPointsFilter;
39
40 class VISU_StreamLinesPL : public VISU_DeformedShapePL
41 {
42 protected:
43   VISU_StreamLinesPL();
44   VISU_StreamLinesPL(const VISU_StreamLinesPL&);
45
46   virtual
47   ~VISU_StreamLinesPL();
48
49 public:
50   vtkTypeMacro(VISU_StreamLinesPL,VISU_DeformedShapePL);
51
52   static
53   VISU_StreamLinesPL* 
54   New();
55
56   virtual
57   void
58   ShallowCopy(VISU_PipeLine *thePipeLine);
59
60   virtual
61   int 
62   SetParams(vtkFloatingPointType theIntStep, 
63             vtkFloatingPointType thePropogationTime,
64             vtkFloatingPointType theStepLength,
65             vtkPointSet* theSource = NULL, 
66             vtkFloatingPointType thePercents = 0.3,
67             int theDirection = VTK_INTEGRATE_BOTH_DIRECTIONS,
68             int isOnlyTry = false);
69
70   virtual
71   vtkPointSet*
72   GetSource();
73
74   virtual
75   vtkFloatingPointType
76   GetUsedPoints();
77
78   virtual
79   vtkFloatingPointType 
80   GetIntegrationStep();
81
82   virtual
83   vtkFloatingPointType
84   GetPropagationTime();
85
86   virtual
87   vtkFloatingPointType
88   GetStepLength();
89
90   virtual
91   int
92   GetDirection();
93
94   virtual
95   vtkDataSet* 
96   GetStreamerSource();
97
98   virtual
99   vtkFloatingPointType 
100   GetVelocityCoeff();
101
102   virtual
103   vtkFloatingPointType
104   GetMaxIntegrationStep();
105
106   virtual
107   vtkFloatingPointType
108   GetMinIntegrationStep();
109
110   virtual
111   vtkFloatingPointType
112   GetMinStepLength();
113
114   virtual
115   vtkFloatingPointType
116   GetMaxStepLength();
117
118   virtual
119   vtkFloatingPointType
120   GetMinPropagationTime();
121
122   virtual
123   vtkFloatingPointType
124   GetMaxPropagationTime();
125
126   virtual
127   vtkFloatingPointType
128   GetBasePropagationTime();
129
130 public:
131   virtual
132   THook* 
133   DoHook();
134
135   virtual
136   void
137   Init();
138
139   virtual
140   void
141   Update();
142
143   virtual
144   void
145   SetMapScale(vtkFloatingPointType theMapScale = 1.0);
146
147 public:
148   static
149   vtkFloatingPointType
150   GetMaxIntegrationStep(vtkPointSet* theDataSet);
151
152   static
153   vtkFloatingPointType
154   GetMinIntegrationStep(vtkPointSet* theDataSet, 
155                         vtkFloatingPointType thePercents = 0.3);
156   static
157   vtkFloatingPointType
158   GetBaseIntegrationStep(vtkPointSet* theDataSet, 
159                          vtkFloatingPointType thePercents = 0.3);
160   
161   static 
162   vtkFloatingPointType
163   GetMinPropagationTime(vtkPointSet* theDataSet);
164
165   static
166   vtkFloatingPointType
167   GetMaxPropagationTime(vtkPointSet* theDataSet);
168
169   static
170   vtkFloatingPointType
171   GetBasePropagationTime(vtkPointSet* theDataSet);
172
173   static
174   vtkFloatingPointType
175   GetMinStepLength(vtkPointSet* theDataSet);
176
177   static
178   vtkFloatingPointType
179   GetMaxStepLength(vtkPointSet* theDataSet);
180
181   static
182   vtkFloatingPointType
183   GetBaseStepLength(vtkPointSet* theDataSet);
184
185   static
186   vtkFloatingPointType
187   GetVelocityCoeff(vtkPointSet* theDataSet);
188
189   static
190   int
191   IsPossible(vtkPointSet* theDataSet, 
192              vtkFloatingPointType thePercents = 0.3);
193
194 protected:
195   static 
196   vtkFloatingPointType
197   GetNecasseryMemorySize(vtkIdType theNbOfPoints, 
198                          vtkFloatingPointType theStepLength, 
199                          vtkFloatingPointType thePropogationTime, 
200                          vtkFloatingPointType thePercents = 0.3);
201
202   static
203   int
204   FindPossibleParams(vtkPointSet* theDataSet, 
205                      vtkFloatingPointType& theStepLength, 
206                      vtkFloatingPointType& thePropogationTime, 
207                      vtkFloatingPointType& thePercents);
208   
209   static 
210   vtkFloatingPointType
211   CorrectIntegrationStep(vtkFloatingPointType theStep, 
212                          vtkPointSet* theDataSet, 
213                          vtkFloatingPointType thePercents = 0.3);
214
215   static 
216   vtkFloatingPointType
217   CorrectPropagationTime(vtkFloatingPointType thePropagationTime, 
218                          vtkPointSet* theDataSet);
219
220   static
221   vtkFloatingPointType
222   CorrectStepLength(vtkFloatingPointType theStep, 
223                     vtkPointSet* theDataSet);
224
225   vtkStreamLine* myStream;
226   vtkPointSet* mySource;
227   vtkCellCenters* myCenters;
228   VTKViewer_GeometryFilter *myGeomFilter;
229   VISU_UsedPointsFilter *myPointsFilter;
230   vtkFloatingPointType myPercents;
231 };
232
233
234 #endif
235