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 =========================================================================*/
29 #ifndef vtkParticlePathFilter_h
30 #define vtkParticlePathFilter_h
31 
32 #include "vtkFiltersFlowPathsModule.h" // For export macro
33 #include "vtkSmartPointer.h" // For protected ivars.
34 #include "vtkParticleTracerBase.h"
35 #include <vector> // For protected ivars
36 
37 class VTKFILTERSFLOWPATHS_EXPORT ParticlePathFilterInternal
38 {
39 public:
40  ParticlePathFilterInternal():Filter(nullptr){}
41  void Initialize(vtkParticleTracerBase* filter);
43  virtual int OutputParticles(vtkPolyData* poly);
44  void SetClearCache(bool clearCache)
45  {
46  this->ClearCache = clearCache;
47  }
49  {
50  return this->ClearCache;
51  }
52  void Finalize();
53  void Reset();
54 
55 private:
56  vtkParticleTracerBase* Filter;
57  // Paths doesn't seem to work properly. it is meant to make connecting lines
58  // for the particles
59  std::vector<vtkSmartPointer<vtkIdList> > Paths;
60  bool ClearCache; // false by default
61 };
62 
63 class VTKFILTERSFLOWPATHS_EXPORT vtkParticlePathFilter: public vtkParticleTracerBase
64 {
65 public:
67  void PrintSelf(ostream& os, vtkIndent indent) override;
68 
69  static vtkParticlePathFilter *New();
70 
71 protected:
73  ~vtkParticlePathFilter() override;
74  vtkParticlePathFilter(const vtkParticlePathFilter&) = delete;
75  void operator=(const vtkParticlePathFilter&) = delete;
76 
77  void ResetCache() override;
78  int OutputParticles(vtkPolyData* poly) override;
79  void InitializeExtraPointDataArrays(vtkPointData* outputPD) override;
80  void AppendToExtraPointDataArrays(vtkParticleTracerBaseNamespace::ParticleInformation &) override;
81 
82  void Finalize() override;
83 
85 
86 private:
87  vtkDoubleArray* SimulationTime;
88  vtkIntArray* SimulationTimeStep;
89 };
90 
91 #endif
represent and manipulate point attribute data
Definition: vtkPointData.h:37
void SetClearCache(bool clearCache)
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:85
dynamic, self-adjusting array of double
dynamic, self-adjusting array of int
Definition: vtkIntArray.h:45
a simple class to control print indentation
Definition: vtkIndent.h:39
A Parallel Particle tracer for unsteady vector fields.
A particle tracer for vector fields.