1 // Copyright (C) 2007-2010 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>
39 class VTKViewer_GeometryFilter;
40 class VISU_MaskPointsFilter;
41 class VISU_StreamLine;
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 = NULL,
65 vtkFloatingPointType thePercents = 0.3,
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 = 0.3);
165 GetBaseIntegrationStep(vtkDataSet* theDataSet,
166 vtkFloatingPointType thePercents = 0.3);
170 GetMinPropagationTime(vtkDataSet* theDataSet);
174 GetMaxPropagationTime(vtkDataSet* theDataSet);
178 GetBasePropagationTime(vtkDataSet* theDataSet);
182 GetMinStepLength(vtkDataSet* theDataSet);
186 GetMaxStepLength(vtkDataSet* theDataSet);
190 GetBaseStepLength(vtkDataSet* theDataSet);
194 GetVelocityCoeff(vtkDataSet* theDataSet);
198 IsPossible(vtkPointSet* theDataSet,
199 vtkFloatingPointType thePercents = 0.3);
202 VISU_StreamLinesPL();
205 ~VISU_StreamLinesPL();
209 DoShallowCopy(VISU_PipeLine *thePipeLine,
210 bool theIsCopyInput);
214 GetNecasseryMemorySize(vtkIdType theNbOfPoints,
215 vtkFloatingPointType theStepLength,
216 vtkFloatingPointType thePropogationTime,
217 vtkFloatingPointType thePercents = 0.3);
221 FindPossibleParams(vtkDataSet* theDataSet,
222 vtkFloatingPointType& theStepLength,
223 vtkFloatingPointType& thePropogationTime,
224 vtkFloatingPointType& thePercents);
228 CorrectIntegrationStep(vtkFloatingPointType theStep,
229 vtkDataSet* theDataSet,
230 vtkFloatingPointType thePercents = 0.3);
234 CorrectPropagationTime(vtkFloatingPointType thePropagationTime,
235 vtkDataSet* theDataSet);
239 CorrectStepLength(vtkFloatingPointType theStep,
240 vtkDataSet* theDataSet);
242 VISU_StreamLine* myStream;
243 vtkPointSet* mySource;
244 vtkCellCenters* myCenters;
245 VTKViewer_GeometryFilter *myGeomFilter;
246 VISU_MaskPointsFilter *myPointsFilter;
247 vtkFloatingPointType myPercents;
250 VISU_StreamLinesPL(const VISU_StreamLinesPL&); // Not implemented.
251 void operator=(const VISU_StreamLinesPL&); // Not implemented.