VTK  9.3.20240424
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
20#ifndef vtkAngularPeriodicDataArray_h
21#define vtkAngularPeriodicDataArray_h
22
23#include "vtkPeriodicDataArray.h" // Parent
24
25#define VTK_PERIODIC_ARRAY_AXIS_X 0
26#define VTK_PERIODIC_ARRAY_AXIS_Y 1
27#define VTK_PERIODIC_ARRAY_AXIS_Z 2
28
29VTK_ABI_NAMESPACE_BEGIN
30class vtkMatrix3x3;
31
32template <class Scalar>
34{
35public:
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
73protected:
76
80 void Transform(Scalar* tuple) const override;
81
86
87private:
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
99VTK_ABI_NAMESPACE_END
100#include "vtkAngularPeriodicDataArray.txx"
101
102#endif // vtkAngularPeriodicDataArray_h
103// VTK-HeaderTest-Exclude: vtkAngularPeriodicDataArray.h
Array-Of-Structs implementation of vtkGenericDataArray.
Map native an Array into an angulat periodic array.
void SetAxis(int axis)
Set/Get the rotation axis.
void SetAxisToZ()
Set/Get the rotation axis.
void InitializeArray(vtkAOSDataArrayTemplate< Scalar > *inputData)
Initialize the mapped array with the original input data array.
vtkAOSArrayNewInstanceMacro(vtkAngularPeriodicDataArray< Scalar >)
void SetAxisToY()
Set/Get the rotation axis.
vtkAbstractTemplateTypeMacro(vtkAngularPeriodicDataArray< Scalar >, vtkPeriodicDataArray< Scalar >)
void UpdateRotationMatrix()
Update rotation matrix from Axis, Angle and Center.
void SetAxisToX()
Set/Get the rotation axis.
~vtkAngularPeriodicDataArray() override
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static vtkAngularPeriodicDataArray * New()
void Transform(Scalar *tuple) const override
Transform the provided tuple.
void SetCenter(double *center)
Set/Get the rotation center.
void SetAngle(double angle)
Set/Get the rotation angle in degrees.
a simple class to control print indentation
Definition vtkIndent.h:108
represent and manipulate 3x3 transformation matrices
Map native an Array into an angulat periodic array.
#define VTK_PERIODIC_ARRAY_AXIS_X
#define VTK_PERIODIC_ARRAY_AXIS_Y
#define VTK_PERIODIC_ARRAY_AXIS_Z