VTK  9.7.1
vtkAngularPeriodicDataArray.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
3 
17 #ifndef vtkAngularPeriodicDataArray_h
18 #define vtkAngularPeriodicDataArray_h
19 
20 #include "vtkPeriodicDataArray.h" // Parent
21 
22 #define VTK_PERIODIC_ARRAY_AXIS_X 0
23 #define VTK_PERIODIC_ARRAY_AXIS_Y 1
24 #define VTK_PERIODIC_ARRAY_AXIS_Z 2
25 
26 VTK_ABI_NAMESPACE_BEGIN
27 class vtkMatrix3x3;
28 
29 template <class Scalar>
31  "No longer needed because vtkAngularPeriodicFilter generates an "
32  "implicit array using an internally defined backend.") vtkAngularPeriodicDataArray
33  : public vtkPeriodicDataArray<Scalar>
34 {
35 public:
39  void PrintSelf(ostream& os, vtkIndent indent) override;
40 
45 
47 
50  void SetAngle(double angle);
51  vtkGetMacro(Angle, double);
53 
55 
58  void SetCenter(double* center);
59  vtkGetVector3Macro(Center, double);
61 
63 
66  void SetAxis(int axis);
67  vtkGetMacro(Axis, int);
68  void SetAxisToX() { this->SetAxisType(VTK_PERIODIC_ARRAY_AXIS_X); }
69  void SetAxisToY() { this->SetAxisType(VTK_PERIODIC_ARRAY_AXIS_Y); }
70  void SetAxisToZ() { this->SetAxisType(VTK_PERIODIC_ARRAY_AXIS_Z); }
72 
73 protected:
75  ~vtkAngularPeriodicDataArray() override;
76 
80  void Transform(Scalar* tuple) const override;
81 
85  void UpdateRotationMatrix();
86 
87 private:
89  void operator=(const vtkAngularPeriodicDataArray&) = delete;
90 
91  double Angle; // Rotation angle in degrees
92  double AngleInRadians; // Rotation angle in radians
93  double Center[3]; // Rotation center
94  int Axis; // Rotation Axis
95 
96  vtkMatrix3x3* RotationMatrix;
97 };
98 
99 VTK_ABI_NAMESPACE_END
100 #include "vtkAngularPeriodicDataArray.txx"
101 
102 #endif // vtkAngularPeriodicDataArray_h
103 // VTK-HeaderTest-Exclude: vtkAngularPeriodicDataArray.h
#define vtkAOSArrayNewInstanceMacro(thisClass)
Map native an Array into an angulat periodic array.
void SetAxisToY()
Set/Get the rotation axis.
Map native an Array into an angulat periodic array.
#define VTK_PERIODIC_ARRAY_AXIS_Z
a simple class to control print indentation
Definition: vtkIndent.h:28
#define VTK_PERIODIC_ARRAY_AXIS_Y
virtual void Transform(Scalar *tuple) const =0
Transform the provided tuple.
A filter to produce mapped angular periodic multiblock dataset from a single block, by rotation.
void InitializeArray(vtkAOSDataArrayTemplate< Scalar > *inputData)
Initialize the mapped array with the original input data array.
void SetAxisToX()
Set/Get the rotation axis.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
#define VTK_PERIODIC_ARRAY_AXIS_X
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
represent and manipulate 3x3 transformation matrices
Definition: vtkMatrix3x3.h:26
void SetAxisToZ()
Set/Get the rotation axis.
#define VTK_DEPRECATED_IN_9_7_0(reason)