VTK  9.2.5
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
34#include "vtkSmartPointer.h" // For protected ivars.
35#include <vector> // For protected ivars
36
37class VTKFILTERSFLOWPATHS_EXPORT ParticlePathFilterInternal
38{
39public:
41 : Filter(nullptr)
42 {
43 }
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
52private:
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
60class VTKFILTERSFLOWPATHS_EXPORT vtkParticlePathFilter : public vtkParticleTracerBase
61{
62public:
64 void PrintSelf(ostream& os, vtkIndent indent) override;
65
67
68protected:
72 void operator=(const vtkParticlePathFilter&) = delete;
73
74 void ResetCache() override;
75 int OutputParticles(vtkPolyData* particles) 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 //
87 vtkInformationVector* outputVector) override;
88
90
91private:
92 vtkDoubleArray* SimulationTime;
93 vtkIntArray* SimulationTimeStep;
94};
95
96#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:40
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
dynamic, self-adjusting array of int
Definition: vtkIntArray.h:46
A Parallel Particle tracer for unsteady vector fields.
static vtkParticlePathFilter * New()
void SetToExtraPointDataArrays(vtkIdType particleId, vtkParticleTracerBaseNamespace::ParticleInformation &) override
vtkParticlePathFilter(const vtkParticlePathFilter &)=delete
~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:42
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:91
int vtkIdType
Definition: vtkType.h:332