1 // VISU OBJECT : interactive object for VISU entities implementation
3 // Copyright (C) 2003 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
23 // File: VISU_PipeLine.hxx
24 // Author: Alexey PETROV
27 #ifndef VISU_StreamLinesPL_HeaderFile
28 #define VISU_StreamLinesPL_HeaderFile
30 #include "VISU_DeformedShapePL.hxx"
31 #include <vtkStreamLine.h>
37 class SALOME_GeometryFilter;
38 class VISU_UsedPointsFilter;
40 class VISU_StreamLinesPL : public VISU_DeformedShapePL{
43 VISU_StreamLinesPL(const VISU_StreamLinesPL&);
45 vtkTypeMacro(VISU_StreamLinesPL,VISU_DeformedShapePL);
46 static VISU_StreamLinesPL* New();
47 virtual ~VISU_StreamLinesPL();
48 virtual void ShallowCopy(VISU_PipeLine *thePipeLine);
50 virtual int SetParams(float theIntStep,
51 float thePropogationTime,
53 vtkPointSet* theSource = NULL,
54 float thePercents = 0.3,
55 int theDirection = VTK_INTEGRATE_BOTH_DIRECTIONS,
56 int isOnlyTry = false);
57 virtual vtkPointSet* GetSource();
58 virtual float GetUsedPoints();
59 virtual float GetIntegrationStep();
60 virtual float GetPropagationTime();
61 virtual float GetStepLength();
62 virtual int GetDirection();
64 virtual vtkDataSet* GetStreamerSource();
65 virtual float GetVelocityCoeff();
67 virtual float GetMaxIntegrationStep();
68 virtual float GetMinIntegrationStep();
70 virtual float GetMinStepLength();
71 virtual float GetMaxStepLength();
73 virtual float GetMinPropagationTime();
74 virtual float GetMaxPropagationTime();
75 virtual float GetBasePropagationTime();
78 virtual THook* DoHook();
80 virtual void Update();
81 virtual void SetMapScale(float theMapScale = 1.0);
84 static float GetMaxIntegrationStep(vtkPointSet* theDataSet);
85 static float GetMinIntegrationStep(vtkPointSet* theDataSet, float thePercents = 0.3);
86 static float GetBaseIntegrationStep(vtkPointSet* theDataSet, float thePercents = 0.3);
88 static float GetMinPropagationTime(vtkPointSet* theDataSet);
89 static float GetMaxPropagationTime(vtkPointSet* theDataSet);
90 static float GetBasePropagationTime(vtkPointSet* theDataSet);
92 static float GetMinStepLength(vtkPointSet* theDataSet);
93 static float GetMaxStepLength(vtkPointSet* theDataSet);
94 static float GetBaseStepLength(vtkPointSet* theDataSet);
96 static float GetVelocityCoeff(vtkPointSet* theDataSet);
98 static int IsPossible(vtkPointSet* theDataSet, float thePercents = 0.3);
101 static float GetNecasseryMemorySize(vtkIdType theNbOfPoints, float theStepLength,
102 float thePropogationTime, float thePercents = 0.3);
103 static int FindPossibleParams(vtkPointSet* theDataSet, float& theStepLength,
104 float& thePropogationTime, float& thePercents);
106 static float CorrectIntegrationStep(float theStep, vtkPointSet* theDataSet, float thePercents = 0.3);
107 static float CorrectPropagationTime(float thePropagationTime, vtkPointSet* theDataSet);
108 static float CorrectStepLength(float theStep, vtkPointSet* theDataSet);
110 vtkStreamLine* myStream;
111 vtkPointSet* mySource;
112 vtkCellCenters* myCenters;
113 SALOME_GeometryFilter *myGeomFilter;
114 VISU_UsedPointsFilter *myPointsFilter;