VTK  9.3.20240328
vtkTemporalSnapToTimeStep.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
23 #ifndef vtkTemporalSnapToTimeStep_h
24 #define vtkTemporalSnapToTimeStep_h
25 
26 #include "vtkFiltersHybridModule.h" // For export macro
28 
29 #include <vector> // used because I am a bad boy. So there.
30 
31 VTK_ABI_NAMESPACE_BEGIN
32 class VTKFILTERSHYBRID_EXPORT vtkTemporalSnapToTimeStep : public vtkPassInputTypeAlgorithm
33 {
34 public:
37  void PrintSelf(ostream& os, vtkIndent indent) override;
38 
39  enum
40  {
41  VTK_SNAP_NEAREST = 0,
43  VTK_SNAP_NEXTABOVE_OR_EQUAL
44  };
45 
46  vtkSetMacro(SnapMode, int);
47  vtkGetMacro(SnapMode, int);
48  void SetSnapModeToNearest() { this->SetSnapMode(VTK_SNAP_NEAREST); }
49  void SetSnapModeToNextBelowOrEqual() { this->SetSnapMode(VTK_SNAP_NEXTBELOW_OR_EQUAL); }
50  void SetSnapModeToNextAboveOrEqual() { this->SetSnapMode(VTK_SNAP_NEXTABOVE_OR_EQUAL); }
51 
52 protected:
55 
60  vtkInformationVector* outputVector) override;
61 
63  vtkInformationVector* outputVector) override;
64 
66  vtkInformationVector* outputVector) override;
67 
68  int RequestData(vtkInformation* request, vtkInformationVector** inputVector,
69  vtkInformationVector* outputVector) override;
70 
71  std::vector<double> InputTimeValues;
73  int SnapMode;
74 
75 private:
77  void operator=(const vtkTemporalSnapToTimeStep&) = delete;
78 };
79 
80 VTK_ABI_NAMESPACE_END
81 #endif
a simple class to control print indentation
Definition: vtkIndent.h:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Superclass for algorithms that produce output of the same type as input.
modify the time range/steps of temporal data
int RequestUpdateExtent(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
This is called within ProcessRequest when each filter in the pipeline decides what portion of its inp...
vtkTypeBool ProcessRequest(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
see vtkAlgorithm for details
static vtkTemporalSnapToTimeStep * New()
int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
This is called within ProcessRequest when a request asks the algorithm to do its work.
~vtkTemporalSnapToTimeStep() override
std::vector< double > InputTimeValues
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
This is called within ProcessRequest when a request asks for Information.
int vtkTypeBool
Definition: vtkABI.h:64