Version: 6.3.1

src/PIPELINE/VISU_StreamLinesPL.hxx

Go to the documentation of this file.
00001 // Copyright (C) 2007-2011  CEA/DEN, EDF R&D, OPEN CASCADE
00002 //
00003 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
00004 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
00005 //
00006 // This library is free software; you can redistribute it and/or
00007 // modify it under the terms of the GNU Lesser General Public
00008 // License as published by the Free Software Foundation; either
00009 // version 2.1 of the License.
00010 //
00011 // This library is distributed in the hope that it will be useful,
00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014 // Lesser General Public License for more details.
00015 //
00016 // You should have received a copy of the GNU Lesser General Public
00017 // License along with this library; if not, write to the Free Software
00018 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00019 //
00020 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00021 //
00022 
00023 //  VISU OBJECT : interactive object for VISU entities implementation
00024 // File:    VISU_StreamLinesPL.hxx
00025 // Author:  Alexey PETROV
00026 // Module : VISU
00027 //
00028 #ifndef VISU_StreamLinesPL_HeaderFile
00029 #define VISU_StreamLinesPL_HeaderFile
00030 
00031 #include "VISUPipeline.hxx"
00032 #include "VISU_DeformedShapePL.hxx"
00033 
00034 #include <vtkStreamer.h>
00035 
00036 class vtkDataSet;
00037 class vtkPointSet;
00038 class VTKViewer_CellCenters;
00039 class VTKViewer_GeometryFilter;
00040 class VISU_MaskPointsFilter;
00041 class vtkStreamLine;
00042 
00043 
00044 //----------------------------------------------------------------------------
00045 class VISU_PIPELINE_EXPORT VISU_StreamLinesPL : public VISU_DeformedShapePL
00046 {
00047 public:
00048   vtkTypeMacro(VISU_StreamLinesPL, VISU_DeformedShapePL);
00049 
00050   static
00051   VISU_StreamLinesPL*
00052   New();
00053 
00054   virtual
00055   unsigned long int 
00056   GetMTime();
00057 
00058   //----------------------------------------------------------------------------
00059   virtual
00060   size_t
00061   SetParams(vtkFloatingPointType theIntStep,
00062             vtkFloatingPointType thePropogationTime,
00063             vtkFloatingPointType theStepLength,
00064             vtkPointSet* theSource,
00065             vtkFloatingPointType thePercents,
00066             int theDirection = VTK_INTEGRATE_BOTH_DIRECTIONS);
00067 
00068   virtual
00069   vtkPointSet*
00070   GetSource();
00071 
00072   virtual
00073   vtkFloatingPointType
00074   GetUsedPoints();
00075 
00076   virtual
00077   vtkFloatingPointType 
00078   GetIntegrationStep();
00079 
00080   virtual
00081   vtkFloatingPointType
00082   GetPropagationTime();
00083 
00084   virtual
00085   vtkFloatingPointType
00086   GetStepLength();
00087 
00088   virtual
00089   int
00090   GetDirection();
00091 
00092   virtual
00093   vtkDataSet* 
00094   GetStreamerSource();
00095 
00096   virtual
00097   vtkFloatingPointType 
00098   GetVelocityCoeff();
00099 
00100   virtual
00101   vtkFloatingPointType
00102   GetMaxIntegrationStep();
00103 
00104   virtual
00105   vtkFloatingPointType
00106   GetMinIntegrationStep();
00107 
00108   virtual
00109   vtkFloatingPointType
00110   GetMinStepLength();
00111 
00112   virtual
00113   vtkFloatingPointType
00114   GetMaxStepLength();
00115 
00116   virtual
00117   vtkFloatingPointType
00118   GetMinPropagationTime();
00119 
00120   virtual
00121   vtkFloatingPointType
00122   GetMaxPropagationTime();
00123 
00124   virtual
00125   vtkFloatingPointType
00126   GetBasePropagationTime();
00127 
00128 public:
00129   virtual
00130   vtkDataSet* 
00131   InsertCustomPL();
00132 
00133   virtual
00134   void
00135   Init();
00136 
00137   virtual
00138   void
00139   Build();
00140 
00141   virtual
00142   void
00143   Update();
00144 
00146   virtual
00147   unsigned long int
00148   GetMemorySize();
00149 
00150   virtual
00151   void
00152   SetMapScale(vtkFloatingPointType theMapScale = 1.0);
00153 
00154 public:
00155   static
00156   vtkFloatingPointType
00157   GetMaxIntegrationStep(vtkDataSet* theDataSet);
00158 
00159   static
00160   vtkFloatingPointType
00161   GetMinIntegrationStep(vtkDataSet* theDataSet, 
00162                         vtkFloatingPointType thePercents);
00163   static
00164   vtkFloatingPointType
00165   GetBaseIntegrationStep(vtkDataSet* theDataSet, 
00166                          vtkFloatingPointType thePercents);
00167   
00168   static 
00169   vtkFloatingPointType
00170   GetMinPropagationTime(vtkDataSet* theDataSet, 
00171                         vtkFloatingPointType thePercents);
00172 
00173   static
00174   vtkFloatingPointType
00175   GetMaxPropagationTime(vtkDataSet* theDataSet);
00176 
00177   static
00178   vtkFloatingPointType
00179   GetBasePropagationTime(vtkDataSet* theDataSet);
00180 
00181   static
00182   vtkFloatingPointType
00183   GetMinStepLength(vtkDataSet* theDataSet, 
00184                    vtkFloatingPointType thePercents);
00185 
00186   static
00187   vtkFloatingPointType
00188   GetMaxStepLength(vtkDataSet* theDataSet);
00189 
00190   static
00191   vtkFloatingPointType
00192   GetBaseStepLength(vtkDataSet* theDataSet, 
00193                     vtkFloatingPointType thePercents);
00194 
00195   static
00196   vtkFloatingPointType
00197   GetVelocityCoeff(vtkDataSet* theDataSet);
00198 
00199   static
00200   size_t
00201   IsPossible(vtkPointSet* theDataSet);
00202 
00203 protected:
00204   VISU_StreamLinesPL();
00205 
00206   virtual
00207   ~VISU_StreamLinesPL();
00208 
00209   virtual
00210   void
00211   DoShallowCopy(VISU_PipeLine *thePipeLine,
00212                 bool theIsCopyInput);
00213 
00214   static 
00215   vtkFloatingPointType
00216   GetNecasseryMemorySize(vtkIdType theNbOfPoints, 
00217                          vtkFloatingPointType theStepLength, 
00218                          vtkFloatingPointType thePropogationTime, 
00219                          vtkFloatingPointType thePercents);
00220 
00221   static
00222   size_t
00223   FindPossibleParams(vtkDataSet* theDataSet, 
00224                      vtkFloatingPointType& theStepLength, 
00225                      vtkFloatingPointType& thePropogationTime, 
00226                      vtkFloatingPointType& thePercents);
00227   
00228   static 
00229   vtkFloatingPointType
00230   CorrectIntegrationStep(vtkFloatingPointType theStep, 
00231                          vtkDataSet* theDataSet, 
00232                          vtkFloatingPointType thePercents);
00233 
00234   static 
00235   vtkFloatingPointType
00236   CorrectPropagationTime(vtkFloatingPointType thePropagationTime, 
00237                          vtkDataSet* theDataSet, 
00238                          vtkFloatingPointType thePercents);
00239 
00240   static
00241   vtkFloatingPointType
00242   CorrectStepLength(vtkFloatingPointType theStep, 
00243                     vtkDataSet* theDataSet, 
00244                     vtkFloatingPointType thePercents);
00245 
00246   static
00247   vtkFloatingPointType
00248   GetUsedPointsDefault();
00249 
00250   vtkStreamLine* myStream;
00251   vtkPointSet* mySource;
00252   VTKViewer_CellCenters* myCenters;
00253   VTKViewer_GeometryFilter *myGeomFilter;
00254   VISU_MaskPointsFilter *myPointsFilter;
00255   vtkFloatingPointType myPercents;
00256 
00257 private:
00258   VISU_StreamLinesPL(const VISU_StreamLinesPL&);  // Not implemented.
00259   void operator=(const VISU_StreamLinesPL&);  // Not implemented.
00260 };
00261 
00262 
00263 #endif
00264  
Copyright © 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS