VTK
vtkParticlePathFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkParticlePathFilter.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
26 #ifndef vtkParticlePathFilter_h
27 #define vtkParticlePathFilter_h
28 
29 #include "vtkFiltersFlowPathsModule.h" // For export macro
30 #include "vtkSmartPointer.h" // For protected ivars.
31 #include "vtkParticleTracerBase.h"
32 #include <vector> // For protected ivars
33 
34 class VTKFILTERSFLOWPATHS_EXPORT ParticlePathFilterInternal
35 {
36 public:
37  ParticlePathFilterInternal():Filter(nullptr){}
38  void Initialize(vtkParticleTracerBase* filter);
40  virtual int OutputParticles(vtkPolyData* poly);
41  void SetClearCache(bool clearCache)
42  {
43  this->ClearCache = clearCache;
44  }
46  {
47  return this->ClearCache;
48  }
49  void Finalize();
50  void Reset();
51 
52 private:
53  vtkParticleTracerBase* Filter;
54  // Paths doesn't seem to work properly. it is meant to make connecting lines
55  // for the particles
56  std::vector<vtkSmartPointer<vtkIdList> > Paths;
57  bool ClearCache; // false by default
58 };
59 
60 class VTKFILTERSFLOWPATHS_EXPORT vtkParticlePathFilter: public vtkParticleTracerBase
61 {
62 public:
64  void PrintSelf(ostream& os, vtkIndent indent) override;
65 
66  static vtkParticlePathFilter *New();
67 
68 protected:
70  ~vtkParticlePathFilter() override;
72  void operator=(const vtkParticlePathFilter&) = delete;
73 
74  void ResetCache() override;
75  int OutputParticles(vtkPolyData* poly) override;
76  void InitializeExtraPointDataArrays(vtkPointData* outputPD) override;
78 
79  void Finalize() override;
80 
82 
83 private:
84  vtkDoubleArray* SimulationTime;
85  vtkIntArray* SimulationTimeStep;
86 };
87 
88 #endif
represent and manipulate point attribute data
Definition: vtkPointData.h:31
void SetClearCache(bool clearCache)
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:79
dynamic, self-adjusting array of double
static vtkPolyDataAlgorithm * New()
virtual void AppendToExtraPointDataArrays(vtkParticleTracerBaseNamespace::ParticleInformation &)
dynamic, self-adjusting array of int
Definition: vtkIntArray.h:39
a simple class to control print indentation
Definition: vtkIndent.h:33
virtual void ResetCache()
A Parallel Particle tracer for unsteady vector fields.
virtual void InitializeExtraPointDataArrays(vtkPointData *vtkNotUsed(outputPD))
Methods to append values to existing point data arrays that may only be desired on specific concrete ...
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual int OutputParticles(vtkPolyData *poly)=0
ParticlePathFilterInternal It
A particle tracer for vector fields.