VTK  9.2.6
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 "vtkParticleTracerBase.h"
34 #include "vtkSmartPointer.h" // For protected ivars.
35 #include <vector> // For protected ivars
36 
37 class VTKFILTERSFLOWPATHS_EXPORT ParticlePathFilterInternal
38 {
39 public:
41  : Filter(nullptr)
42  {
43  }
44  void Initialize(vtkParticleTracerBase* filter);
45  virtual ~ParticlePathFilterInternal() = default;
46  virtual int OutputParticles(vtkPolyData* particles);
47  void SetClearCache(bool clearCache) { this->ClearCache = clearCache; }
48  bool GetClearCache() { return this->ClearCache; }
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* particles) override;
76  void InitializeExtraPointDataArrays(vtkPointData* outputPD) override;
79 
80  void Finalize() override;
81 
82  //
83  // Store any information we need in the output and fetch what we can
84  // from the input
85  //
86  int RequestInformation(vtkInformation* request, vtkInformationVector** inputVector,
87  vtkInformationVector* outputVector) override;
88 
90 
91 private:
92  vtkDoubleArray* SimulationTime;
93  vtkIntArray* SimulationTimeStep;
94 };
95 
96 #endif
represent and manipulate point attribute data
Definition: vtkPointData.h:41
int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
Store vtkAlgorithm input/output information.
void SetClearCache(bool clearCache)
int vtkIdType
Definition: vtkType.h:332
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:90
dynamic, self-adjusting array of double
static vtkPolyDataAlgorithm * New()
dynamic, self-adjusting array of int
Definition: vtkIntArray.h:45
a simple class to control print indentation
Definition: vtkIndent.h:39
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 void SetToExtraPointDataArrays(vtkIdType, vtkParticleTracerBaseNamespace::ParticleInformation &)
Store zero or more vtkInformation instances.
virtual int OutputParticles(vtkPolyData *poly)=0
ParticlePathFilterInternal It
A particle tracer for vector fields.