VTK  9.4.20241108
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
16#include "vtkCellGridQuery.h" // For internal query class.
17#include "vtkFiltersCellGridModule.h" // For export macro
18#include "vtkNew.h" // for ivar
19
20VTK_ABI_NAMESPACE_BEGIN
21
22class VTKFILTERSCELLGRID_EXPORT vtkCellGridWarp : public vtkCellGridAlgorithm
23{
24public:
27 void PrintSelf(ostream& os, vtkIndent indent) override;
28
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
60protected:
62 ~vtkCellGridWarp() override = default;
63
65 vtkInformation* request, vtkInformationVector** inInfo, vtkInformationVector* ouInfo) override;
66
68
69private:
70 vtkCellGridWarp(const vtkCellGridWarp&) = delete;
71 void operator=(const vtkCellGridWarp&) = delete;
72};
73
74VTK_ABI_NAMESPACE_END
75#endif // vtkCellGridWarp_h
A function defined over the physical domain of a vtkCellGrid.
Superclass for algorithms that produce only polydata as output.
Perform an operation on cells in a vtkCellMetadata instance.
Cell-grid query used to apply deformations to an input shape attribute.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual void SetDeformationAttribute(vtkCellAttribute *deformation)
Set/get the vector-valued attribute to apply as a deformation to the input shape.
static Query * New()
Create a deformed copy of the input.
vtkMTimeType GetMTime() override
Overridden to include the Request's MTime in addition to our own.
int RequestData(vtkInformation *request, vtkInformationVector **inInfo, vtkInformationVector *ouInfo) override
This is called by the superclass.
virtual double GetScaleFactor() const
~vtkCellGridWarp() override=default
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkNew< Query > Request
static vtkCellGridWarp * New()
virtual void SetScaleFactor(double scaleFactor)
Set/get a scale factor applied to the deformation attribute.
a simple class to control print indentation
Definition vtkIndent.h:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Allocate and hold a VTK object.
Definition vtkNew.h:167
vtkTypeUInt32 vtkMTimeType
Definition vtkType.h:270