VTK  9.2.6
vtkGenerateTimeSteps.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkGenerateTimeSteps.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=========================================================================*/
23
24#ifndef vtkGenerateTimeSteps_h
25#define vtkGenerateTimeSteps_h
26
27#include "vtkFiltersHybridModule.h" // for export macro
29
30#include <vector> // for time steps
31
32class VTKFILTERSHYBRID_EXPORT vtkGenerateTimeSteps : public vtkPassInputTypeAlgorithm
33{
34public:
36 void PrintSelf(ostream& os, vtkIndent indent) override;
37
39
43 int GetNumberOfTimeSteps() const { return static_cast<int>(this->TimeStepValues.size()); }
44
48 void AddTimeStepValue(double timeStepValue);
49
51
55 void SetTimeStepValues(int count, const double* timeStepValues);
56 void GetTimeStepValues(double* timeStepValues) const;
58
62 void GenerateTimeStepValues(double begin, double end, double step);
63
65
69 {
70 this->TimeStepValues.clear();
71 this->Modified();
72 }
73
74
75protected:
77 ~vtkGenerateTimeSteps() override = default;
78
82
83 std::vector<double> TimeStepValues;
84
85private:
87 void operator=(const vtkGenerateTimeSteps&) = delete;
88};
89
90#endif // vtkGenerateTimeSteps_h
void GetTimeStepValues(double *timeStepValues) const
Get/Set an array of time step values.
int GetNumberOfTimeSteps() const
Get the number of time steps that will be extracted.
~vtkGenerateTimeSteps() override=default
std::vector< double > TimeStepValues
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called within ProcessRequest when a request asks the algorithm to do its work.
vtkGenerateTimeSteps()=default
int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called within ProcessRequest when each filter in the pipeline decides what portion of its inp...
static vtkGenerateTimeSteps * New()
int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called within ProcessRequest when a request asks for Information.
void SetTimeStepValues(int count, const double *timeStepValues)
Get/Set an array of time step values.
void GenerateTimeStepValues(double begin, double end, double step)
Generate a range of values in [begin, end) with a step size of 'step'.
void AddTimeStepValue(double timeStepValue)
Add a time step value.
void ClearTimeStepValues()
Clear the time step values.
a simple class to control print indentation
Definition vtkIndent.h:34
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
virtual void Modified()
Update the modification time for this object.