VTK  9.3.1
vtkGenerateTimeSteps.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
15 #ifndef vtkGenerateTimeSteps_h
16 #define vtkGenerateTimeSteps_h
17 
18 #include "vtkFiltersHybridModule.h" // for export macro
20 
21 #include <vector> // for time steps
22 
23 VTK_ABI_NAMESPACE_BEGIN
24 class VTKFILTERSHYBRID_EXPORT vtkGenerateTimeSteps : public vtkPassInputTypeAlgorithm
25 {
26 public:
28  void PrintSelf(ostream& os, vtkIndent indent) override;
29 
30  static vtkGenerateTimeSteps* New();
31 
35  int GetNumberOfTimeSteps() const { return static_cast<int>(this->TimeStepValues.size()); }
36 
40  void AddTimeStepValue(double timeStepValue);
41 
43 
47  void SetTimeStepValues(int count, const double* timeStepValues);
48  void GetTimeStepValues(double* timeStepValues) const;
50 
54  void GenerateTimeStepValues(double begin, double end, double step);
55 
57 
61  {
62  this->TimeStepValues.clear();
63  this->Modified();
64  }
66 
67 protected:
68  vtkGenerateTimeSteps() = default;
69  ~vtkGenerateTimeSteps() override = default;
70 
73 
74  std::vector<double> TimeStepValues;
75 
76 private:
78  void operator=(const vtkGenerateTimeSteps&) = delete;
79 };
80 VTK_ABI_NAMESPACE_END
81 
82 #endif // vtkGenerateTimeSteps_h
virtual int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called within ProcessRequest when a request asks for Information.
std::vector< double > TimeStepValues
Superclass for algorithms that produce output of the same type as input.
Store vtkAlgorithm input/output information.
int GetNumberOfTimeSteps() const
Get the number of time steps that will be extracted.
a simple class to control print indentation
Definition: vtkIndent.h:28
void ClearTimeStepValues()
Clear the time step values.
virtual void Modified()
Update the modification time for this object.
Generate timesteps on any input.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
Store zero or more vtkInformation instances.
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called within ProcessRequest when a request asks the algorithm to do its work.
static vtkPassInputTypeAlgorithm * New()