Salome HOME
Join modifications from BR_Dev_For_4_0 tag V4_1_1.
[modules/visu.git] / src / PIPELINE / VISU_StreamLinesPL.hxx
index 6e9bc4138fc3e8ca0743ad22ad855c1ed6545189..6bff1d61edfc09eb63880a485631da6c9fa4e6a9 100644 (file)
 //  License along with this library; if not, write to the Free Software 
 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
 // 
-//  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
 //
-// File:    VISU_PipeLine.hxx
+// File:    VISU_StreamLinesPL.hxx
 // Author:  Alexey PETROV
 // Module : VISU
 
 #ifndef VISU_StreamLinesPL_HeaderFile
 #define VISU_StreamLinesPL_HeaderFile
 
+#include "VISUPipeline.hxx"
 #include "VISU_DeformedShapePL.hxx"
 #include <vtkStreamLine.h>
 
+class vtkDataSet;
 class vtkPointSet;
 class vtkCellCenters;
-class SALOME_GeometryFilter;
-class VISU_UsedPointsFilter;
+class VTKViewer_GeometryFilter;
+class VISU_MaskPointsFilter;
 
-class VISU_StreamLinesPL : public VISU_DeformedShapePL{
-protected:
-  VISU_StreamLinesPL();
-  VISU_StreamLinesPL(const VISU_StreamLinesPL&);
+
+//----------------------------------------------------------------------------
+class VISU_PIPELINE_EXPORT VISU_StreamLinesPL : public VISU_DeformedShapePL
+{
 public:
-  vtkTypeMacro(VISU_StreamLinesPL,VISU_DeformedShapePL);
-  static VISU_StreamLinesPL* New();
-  virtual ~VISU_StreamLinesPL();
-  virtual void ShallowCopy(VISU_PipeLine *thePipeLine);
-
-  virtual int SetParams(float theIntStep, 
-                       float thePropogationTime,
-                       float theStepLength,
-                       vtkPointSet* theSource = NULL, 
-                       float thePercents = 0.3,
-                       int theDirection = VTK_INTEGRATE_BOTH_DIRECTIONS,
-                       int isOnlyTry = false);
-  virtual vtkPointSet* GetSource();
-  virtual float GetUsedPoints();
-  virtual float GetIntegrationStep();
-  virtual float GetPropagationTime();
-  virtual float GetStepLength();
-  virtual int GetDirection();
-
-  virtual vtkDataSet* GetStreamerSource();
-  virtual float GetVelocityCoeff();
-
-  virtual float GetMaxIntegrationStep();
-  virtual float GetMinIntegrationStep();
-
-  virtual float GetMinStepLength();
-  virtual float GetMaxStepLength();
-
-  virtual float GetMinPropagationTime();
-  virtual float GetMaxPropagationTime();
-  virtual float GetBasePropagationTime();
+  vtkTypeMacro(VISU_StreamLinesPL, VISU_DeformedShapePL);
+
+  static
+  VISU_StreamLinesPL*
+  New();
+
+  virtual
+  unsigned long int 
+  GetMTime();
+
+  //----------------------------------------------------------------------------
+  virtual
+  size_t
+  SetParams(vtkFloatingPointType theIntStep,
+           vtkFloatingPointType thePropogationTime,
+           vtkFloatingPointType theStepLength,
+           vtkPointSet* theSource = NULL,
+           vtkFloatingPointType thePercents = 0.3,
+           int theDirection = VTK_INTEGRATE_BOTH_DIRECTIONS);
+
+  virtual
+  vtkPointSet*
+  GetSource();
+
+  virtual
+  vtkFloatingPointType
+  GetUsedPoints();
+
+  virtual
+  vtkFloatingPointType 
+  GetIntegrationStep();
+
+  virtual
+  vtkFloatingPointType
+  GetPropagationTime();
+
+  virtual
+  vtkFloatingPointType
+  GetStepLength();
+
+  virtual
+  int
+  GetDirection();
+
+  virtual
+  vtkDataSet* 
+  GetStreamerSource();
+
+  virtual
+  vtkFloatingPointType 
+  GetVelocityCoeff();
+
+  virtual
+  vtkFloatingPointType
+  GetMaxIntegrationStep();
+
+  virtual
+  vtkFloatingPointType
+  GetMinIntegrationStep();
+
+  virtual
+  vtkFloatingPointType
+  GetMinStepLength();
+
+  virtual
+  vtkFloatingPointType
+  GetMaxStepLength();
+
+  virtual
+  vtkFloatingPointType
+  GetMinPropagationTime();
+
+  virtual
+  vtkFloatingPointType
+  GetMaxPropagationTime();
+
+  virtual
+  vtkFloatingPointType
+  GetBasePropagationTime();
 
 public:
-  virtual THook* DoHook();
-  virtual void Init();
-  virtual void Update();
-  virtual void SetMapScale(float theMapScale = 1.0);
+  virtual
+  vtkDataSet* 
+  InsertCustomPL();
+
+  virtual
+  void
+  Init();
+
+  virtual
+  void
+  Build();
+
+  virtual
+  void
+  Update();
+
+  //! Gets memory size used by the instance (bytes).
+  virtual
+  unsigned long int
+  GetMemorySize();
+
+  virtual
+  void
+  SetMapScale(vtkFloatingPointType theMapScale = 1.0);
 
 public:
-  static float GetMaxIntegrationStep(vtkPointSet* theDataSet);
-  static float GetMinIntegrationStep(vtkPointSet* theDataSet, float thePercents = 0.3);
-  static float GetBaseIntegrationStep(vtkPointSet* theDataSet, float thePercents = 0.3);
+  static
+  vtkFloatingPointType
+  GetMaxIntegrationStep(vtkDataSet* theDataSet);
+
+  static
+  vtkFloatingPointType
+  GetMinIntegrationStep(vtkDataSet* theDataSet, 
+                       vtkFloatingPointType thePercents = 0.3);
+  static
+  vtkFloatingPointType
+  GetBaseIntegrationStep(vtkDataSet* theDataSet, 
+                        vtkFloatingPointType thePercents = 0.3);
   
-  static float GetMinPropagationTime(vtkPointSet* theDataSet);
-  static float GetMaxPropagationTime(vtkPointSet* theDataSet);
-  static float GetBasePropagationTime(vtkPointSet* theDataSet);
+  static 
+  vtkFloatingPointType
+  GetMinPropagationTime(vtkDataSet* theDataSet);
 
-  static float GetMinStepLength(vtkPointSet* theDataSet);
-  static float GetMaxStepLength(vtkPointSet* theDataSet);
-  static float GetBaseStepLength(vtkPointSet* theDataSet);
+  static
+  vtkFloatingPointType
+  GetMaxPropagationTime(vtkDataSet* theDataSet);
 
-  static float GetVelocityCoeff(vtkPointSet* theDataSet);
+  static
+  vtkFloatingPointType
+  GetBasePropagationTime(vtkDataSet* theDataSet);
 
-  static int IsPossible(vtkPointSet* theDataSet, float thePercents = 0.3);
+  static
+  vtkFloatingPointType
+  GetMinStepLength(vtkDataSet* theDataSet);
+
+  static
+  vtkFloatingPointType
+  GetMaxStepLength(vtkDataSet* theDataSet);
+
+  static
+  vtkFloatingPointType
+  GetBaseStepLength(vtkDataSet* theDataSet);
+
+  static
+  vtkFloatingPointType
+  GetVelocityCoeff(vtkDataSet* theDataSet);
+
+  static
+  size_t
+  IsPossible(vtkPointSet* theDataSet, 
+            vtkFloatingPointType thePercents = 0.3);
 
 protected:
-  static float GetNecasseryMemorySize(vtkIdType theNbOfPoints, float theStepLength, 
-                                     float thePropogationTime, float thePercents = 0.3);
-  static int FindPossibleParams(vtkPointSet* theDataSet, float& theStepLength, 
-                               float& thePropogationTime, float& thePercents);
+  VISU_StreamLinesPL();
+
+  virtual
+  ~VISU_StreamLinesPL();
+
+  virtual
+  void
+  DoShallowCopy(VISU_PipeLine *thePipeLine,
+               bool theIsCopyInput);
+
+  static 
+  size_t
+  GetNecasseryMemorySize(vtkIdType theNbOfPoints, 
+                        vtkFloatingPointType theStepLength, 
+                        vtkFloatingPointType thePropogationTime, 
+                        vtkFloatingPointType thePercents = 0.3);
+
+  static
+  size_t
+  FindPossibleParams(vtkDataSet* theDataSet, 
+                    vtkFloatingPointType& theStepLength, 
+                    vtkFloatingPointType& thePropogationTime, 
+                    vtkFloatingPointType& thePercents);
   
-  static float CorrectIntegrationStep(float theStep, vtkPointSet* theDataSet, float thePercents = 0.3);
-  static float CorrectPropagationTime(float thePropagationTime, vtkPointSet* theDataSet);
-  static float CorrectStepLength(float theStep, vtkPointSet* theDataSet);
+  static 
+  vtkFloatingPointType
+  CorrectIntegrationStep(vtkFloatingPointType theStep, 
+                        vtkDataSet* theDataSet, 
+                        vtkFloatingPointType thePercents = 0.3);
+
+  static 
+  vtkFloatingPointType
+  CorrectPropagationTime(vtkFloatingPointType thePropagationTime, 
+                        vtkDataSet* theDataSet);
+
+  static
+  vtkFloatingPointType
+  CorrectStepLength(vtkFloatingPointType theStep, 
+                   vtkDataSet* theDataSet);
 
   vtkStreamLine* myStream;
   vtkPointSet* mySource;
   vtkCellCenters* myCenters;
-  SALOME_GeometryFilter *myGeomFilter;
-  VISU_UsedPointsFilter *myPointsFilter;
-  float myPercents;
+  VTKViewer_GeometryFilter *myGeomFilter;
+  VISU_MaskPointsFilter *myPointsFilter;
+  vtkFloatingPointType myPercents;
+
+private:
+  VISU_StreamLinesPL(const VISU_StreamLinesPL&);  // Not implemented.
+  void operator=(const VISU_StreamLinesPL&);  // Not implemented.
 };