VTK  9.7.1
vtkCellGridWarp.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
12 #ifndef vtkCellGridWarp_h
13 #define vtkCellGridWarp_h
14 
15 #include "vtkCellGridAlgorithm.h"
16 #include "vtkCellGridQuery.h" // For internal query class.
17 #include "vtkFiltersCellGridModule.h" // For export macro
18 #include "vtkNew.h" // for ivar
19 
20 VTK_ABI_NAMESPACE_BEGIN
21 
22 class VTKFILTERSCELLGRID_EXPORT vtkCellGridWarp : public vtkCellGridAlgorithm
23 {
24 public:
25  static vtkCellGridWarp* New();
27  void PrintSelf(ostream& os, vtkIndent indent) override;
28 
30  vtkMTimeType GetMTime() override;
31 
34  class Query : public vtkCellGridQuery
35  {
36  public:
37  static Query* New();
39  void PrintSelf(ostream& os, vtkIndent indent) override;
40 
42  virtual void SetDeformationAttribute(vtkCellAttribute* deformation);
43  vtkGetObjectMacro(DeformationAttribute, vtkCellAttribute);
44 
46  vtkSetMacro(ScaleFactor, double);
47  vtkGetMacro(ScaleFactor, double);
48 
49  protected:
50  ~Query() override;
51 
52  vtkCellAttribute* DeformationAttribute{ nullptr };
53  double ScaleFactor{ 1.0 };
54  };
55 
57  virtual void SetScaleFactor(double scaleFactor) { this->Request->SetScaleFactor(scaleFactor); }
58  virtual double GetScaleFactor() const { return this->Request->GetScaleFactor(); }
59 
60 protected:
62  ~vtkCellGridWarp() override = default;
63 
64  int RequestData(
65  vtkInformation* request, vtkInformationVector** inInfo, vtkInformationVector* ouInfo) override;
66 
68 
69 private:
70  vtkCellGridWarp(const vtkCellGridWarp&) = delete;
71  void operator=(const vtkCellGridWarp&) = delete;
72 };
73 
74 VTK_ABI_NAMESPACE_END
75 #endif // vtkCellGridWarp_h
Perform an operation on cells in a vtkCellMetadata instance.
Store vtkAlgorithm input/output information.
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:318
static vtkCellGridAlgorithm * New()
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
Superclass for algorithms that produce only polydata as output.
a simple class to control print indentation
Definition: vtkIndent.h:28
A function defined over the physical domain of a vtkCellGrid.
virtual double GetScaleFactor() const
virtual vtkMTimeType GetMTime()
Return this object's modified time.
virtual void SetScaleFactor(double scaleFactor)
Set/get a scale factor applied to the deformation attribute.
Create a deformed copy of the input.
Allocate and hold a VTK object.
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.
vtkNew< Query > Request
Cell-grid query used to apply deformations to an input shape attribute.