VTK  9.3.0
vtkParticlePathFilter.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
17 #ifndef vtkParticlePathFilter_h
18 #define vtkParticlePathFilter_h
19 
20 #include "vtkFiltersFlowPathsModule.h" // For export macro
21 #include "vtkParticleTracerBase.h"
22 #include "vtkSmartPointer.h" // For protected ivars.
23 #include <vector> // For protected ivars
24 
25 VTK_ABI_NAMESPACE_BEGIN
26 class VTKFILTERSFLOWPATHS_EXPORT ParticlePathFilterInternal
27 {
28 public:
30  : Filter(nullptr)
31  {
32  }
34  virtual ~ParticlePathFilterInternal() = default;
35  virtual int OutputParticles(vtkPolyData* particles);
36  void SetClearCache(bool clearCache) { this->ClearCache = clearCache; }
37  bool GetClearCache() { return this->ClearCache; }
38  void Finalize();
39  void Reset();
40 
41 private:
42  vtkParticleTracerBase* Filter;
43  // Paths doesn't seem to work properly. it is meant to make connecting lines
44  // for the particles
45  std::vector<vtkSmartPointer<vtkIdList>> Paths;
46  bool ClearCache; // false by default
47 };
48 
49 class VTKFILTERSFLOWPATHS_EXPORT vtkParticlePathFilter : public vtkParticleTracerBase
50 {
51 public:
53  void PrintSelf(ostream& os, vtkIndent indent) override;
54 
56 
57 protected:
61  void operator=(const vtkParticlePathFilter&) = delete;
62 
63  void ResetCache() override;
64  int OutputParticles(vtkPolyData* particles) override;
65  void InitializeExtraPointDataArrays(vtkPointData* outputPD) override;
68 
69  void Finalize() override;
70 
71  //
72  // Store any information we need in the output and fetch what we can
73  // from the input
74  //
76  vtkInformationVector* outputVector) override;
77 
79 
80 private:
81  vtkDoubleArray* SimulationTime;
82  vtkIntArray* SimulationTimeStep;
83 };
84 
85 VTK_ABI_NAMESPACE_END
86 #endif
void Initialize(vtkParticleTracerBase *filter)
virtual ~ParticlePathFilterInternal()=default
void SetClearCache(bool clearCache)
virtual int OutputParticles(vtkPolyData *particles)
dynamic, self-adjusting array of double
a simple class to control print indentation
Definition: vtkIndent.h:38
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
dynamic, self-adjusting array of int
Definition: vtkIntArray.h:44
A Parallel Particle tracer for unsteady vector fields.
void SetToExtraPointDataArrays(vtkIdType particleId, vtkParticleTracerBaseNamespace::ParticleInformation &) override
vtkParticlePathFilter(const vtkParticlePathFilter &)=delete
static vtkParticlePathFilter * New()
~vtkParticlePathFilter() override
void ResetCache() override
void Finalize() override
void InitializeExtraPointDataArrays(vtkPointData *outputPD) override
void operator=(const vtkParticlePathFilter &)=delete
int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
int OutputParticles(vtkPolyData *particles) override
ParticlePathFilterInternal It
A particle tracer for vector fields.
represent and manipulate point attribute data
Definition: vtkPointData.h:39
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:89
int vtkIdType
Definition: vtkType.h:315