1 // Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
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.
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.
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
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
23 // VISU OBJECT : interactive object for VISU entities implementation
24 // File: VISU_StreamLinesPL.hxx
25 // Author: Alexey PETROV
28 #ifndef VISU_StreamLinesPL_HeaderFile
29 #define VISU_StreamLinesPL_HeaderFile
31 #include "VISUPipeline.hxx"
32 #include "VISU_DeformedShapePL.hxx"
34 #include <vtkStreamer.h>
38 class VTKViewer_CellCenters;
39 class VTKViewer_GeometryFilter;
40 class VISU_MaskPointsFilter;
44 //----------------------------------------------------------------------------
45 class VISU_PIPELINE_EXPORT VISU_StreamLinesPL : public VISU_DeformedShapePL
48 vtkTypeMacro(VISU_StreamLinesPL, VISU_DeformedShapePL);
58 //----------------------------------------------------------------------------
61 SetParams(vtkFloatingPointType theIntStep,
62 vtkFloatingPointType thePropogationTime,
63 vtkFloatingPointType theStepLength,
64 vtkPointSet* theSource,
65 vtkFloatingPointType thePercents,
66 int theDirection = VTK_INTEGRATE_BOTH_DIRECTIONS);
102 GetMaxIntegrationStep();
106 GetMinIntegrationStep();
118 GetMinPropagationTime();
122 GetMaxPropagationTime();
126 GetBasePropagationTime();
145 //! Gets memory size used by the instance (bytes).
152 SetMapScale(vtkFloatingPointType theMapScale = 1.0);
157 GetMaxIntegrationStep(vtkDataSet* theDataSet);
161 GetMinIntegrationStep(vtkDataSet* theDataSet,
162 vtkFloatingPointType thePercents);
165 GetBaseIntegrationStep(vtkDataSet* theDataSet,
166 vtkFloatingPointType thePercents);
170 GetMinPropagationTime(vtkDataSet* theDataSet,
171 vtkFloatingPointType thePercents);
175 GetMaxPropagationTime(vtkDataSet* theDataSet);
179 GetBasePropagationTime(vtkDataSet* theDataSet);
183 GetMinStepLength(vtkDataSet* theDataSet,
184 vtkFloatingPointType thePercents);
188 GetMaxStepLength(vtkDataSet* theDataSet);
192 GetBaseStepLength(vtkDataSet* theDataSet,
193 vtkFloatingPointType thePercents);
197 GetVelocityCoeff(vtkDataSet* theDataSet);
201 IsPossible(vtkPointSet* theDataSet);
204 VISU_StreamLinesPL();
207 ~VISU_StreamLinesPL();
211 DoShallowCopy(VISU_PipeLine *thePipeLine,
212 bool theIsCopyInput);
216 GetNecasseryMemorySize(vtkIdType theNbOfPoints,
217 vtkFloatingPointType theStepLength,
218 vtkFloatingPointType thePropogationTime,
219 vtkFloatingPointType thePercents);
223 FindPossibleParams(vtkDataSet* theDataSet,
224 vtkFloatingPointType& theStepLength,
225 vtkFloatingPointType& thePropogationTime,
226 vtkFloatingPointType& thePercents);
230 CorrectIntegrationStep(vtkFloatingPointType theStep,
231 vtkDataSet* theDataSet,
232 vtkFloatingPointType thePercents);
236 CorrectPropagationTime(vtkFloatingPointType thePropagationTime,
237 vtkDataSet* theDataSet,
238 vtkFloatingPointType thePercents);
242 CorrectStepLength(vtkFloatingPointType theStep,
243 vtkDataSet* theDataSet,
244 vtkFloatingPointType thePercents);
248 GetUsedPointsDefault();
250 vtkStreamLine* myStream;
251 vtkPointSet* mySource;
252 VTKViewer_CellCenters* myCenters;
253 VTKViewer_GeometryFilter *myGeomFilter;
254 VISU_MaskPointsFilter *myPointsFilter;
255 vtkFloatingPointType myPercents;
258 VISU_StreamLinesPL(const VISU_StreamLinesPL&); // Not implemented.
259 void operator=(const VISU_StreamLinesPL&); // Not implemented.