VTK  9.1.0
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
31#include "vtkSmartPointer.h" // For protected ivars.
32#include <vector> // For protected ivars
33
34class VTKFILTERSFLOWPATHS_EXPORT ParticlePathFilterInternal
35{
36public:
38 : Filter(nullptr)
39 {
40 }
42 virtual ~ParticlePathFilterInternal() = default;
43 virtual int OutputParticles(vtkPolyData* particles);
44 void SetClearCache(bool clearCache) { this->ClearCache = clearCache; }
45 bool GetClearCache() { return this->ClearCache; }
46 void Finalize();
47 void Reset();
48
49private:
51 // Paths doesn't seem to work properly. it is meant to make connecting lines
52 // for the particles
53 std::vector<vtkSmartPointer<vtkIdList>> Paths;
54 bool ClearCache; // false by default
55};
56
57class VTKFILTERSFLOWPATHS_EXPORT vtkParticlePathFilter : public vtkParticleTracerBase
58{
59public:
61 void PrintSelf(ostream& os, vtkIndent indent) override;
62
64
65protected:
69 void operator=(const vtkParticlePathFilter&) = delete;
70
71 void ResetCache() override;
72 int OutputParticles(vtkPolyData* particles) override;
75
76 void Finalize() override;
77
78 //
79 // Store any information we need in the output and fetch what we can
80 // from the input
81 //
83 vtkInformationVector* outputVector) override;
84
86
87private:
88 vtkDoubleArray* SimulationTime;
89 vtkIntArray* SimulationTimeStep;
90};
91
92#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:113
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
dynamic, self-adjusting array of int
Definition: vtkIntArray.h:149
A Parallel Particle tracer for unsteady vector fields.
static vtkParticlePathFilter * New()
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
void AppendToExtraPointDataArrays(vtkParticleTracerBaseNamespace::ParticleInformation &) override
ParticlePathFilterInternal It
A particle tracer for vector fields.
represent and manipulate point attribute data
Definition: vtkPointData.h:142
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:195