VTK  9.3.1
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:
54  ~vtkTemporalSnapToTimeStep() override;
55 
60  vtkInformationVector* outputVector) override;
61 
62  int RequestUpdateExtent(vtkInformation* request, vtkInformationVector** inputVector,
63  vtkInformationVector* outputVector) override;
64 
65  int RequestInformation(vtkInformation* request, vtkInformationVector** inputVector,
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
virtual int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called within ProcessRequest when a request asks for Information.
Superclass for algorithms that produce output of the same type as input.
Store vtkAlgorithm input/output information.
modify the time range/steps of temporal data
int vtkTypeBool
Definition: vtkABI.h:64
virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called within ProcessRequest when each filter in the pipeline decides what portion of its inp...
a simple class to control print indentation
Definition: vtkIndent.h:28
vtkTypeBool ProcessRequest(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
see vtkAlgorithm for details
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
std::vector< double > InputTimeValues
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()