VTK  9.2.6
vtkAngularPeriodicDataArray.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkAngularPeriodicDataArray.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
15 
32 #ifndef vtkAngularPeriodicDataArray_h
33 #define vtkAngularPeriodicDataArray_h
34 
35 #include "vtkPeriodicDataArray.h" // Parent
36 
37 #define VTK_PERIODIC_ARRAY_AXIS_X 0
38 #define VTK_PERIODIC_ARRAY_AXIS_Y 1
39 #define VTK_PERIODIC_ARRAY_AXIS_Z 2
40 
41 class vtkMatrix3x3;
42 
43 template <class Scalar>
45 {
46 public:
50  void PrintSelf(ostream& os, vtkIndent indent) override;
51 
56 
58 
61  void SetAngle(double angle);
62  vtkGetMacro(Angle, double);
64 
66 
69  void SetCenter(double* center);
70  vtkGetVector3Macro(Center, double);
72 
74 
77  void SetAxis(int axis);
78  vtkGetMacro(Axis, int);
79  void SetAxisToX(void) { this->SetAxisType(VTK_PERIODIC_ARRAY_AXIS_X); }
80  void SetAxisToY(void) { this->SetAxisType(VTK_PERIODIC_ARRAY_AXIS_Y); }
81  void SetAxisToZ(void) { this->SetAxisType(VTK_PERIODIC_ARRAY_AXIS_Z); }
83 
84 protected:
87 
91  void Transform(Scalar* tuple) const override;
92 
96  void UpdateRotationMatrix();
97 
98 private:
100  void operator=(const vtkAngularPeriodicDataArray&) = delete;
101 
102  double Angle; // Rotation angle in degrees
103  double AngleInRadians; // Rotation angle in radians
104  double Center[3]; // Rotation center
105  int Axis; // Rotation Axis
106 
107  vtkMatrix3x3* RotationMatrix;
108 };
109 
110 #include "vtkAngularPeriodicDataArray.txx"
111 
112 #endif // vtkAngularPeriodicDataArray_h
113 // VTK-HeaderTest-Exclude: vtkAngularPeriodicDataArray.h
void UpdateRotationMatrix()
Update rotation matrix from Axis, Angle and Center.
void Transform(Scalar *tuple) const override
Transform the provided tuple.
void SetCenter(double *center)
Set/Get the rotation center.
~vtkAngularPeriodicDataArray() override
void SetAxis(int axis)
Set/Get the rotation axis.
void SetAngle(double angle)
Set/Get the rotation angle in degrees.
void SetAxisToX(void)
Set/Get the rotation axis.
Map native an Array into an angulat periodic array.
Map native an Array into an angulat periodic array.
void InitializeArray(vtkAOSDataArrayTemplate< Scalar > *inputData)
Initialize the mapped array with the original input data array.
#define VTK_PERIODIC_ARRAY_AXIS_Z
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkAOSArrayNewInstanceMacro(vtkAngularPeriodicDataArray< Scalar >)
#define VTK_PERIODIC_ARRAY_AXIS_Y
static vtkAngularPeriodicDataArray * New()
void SetAxisToY(void)
Set/Get the rotation axis.
void SetAxisToZ(void)
Set/Get the rotation axis.
vtkAbstractTemplateTypeMacro(vtkAngularPeriodicDataArray< Scalar >, vtkPeriodicDataArray< Scalar >)
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
represent and manipulate 3x3 transformation matrices
Definition: vtkMatrix3x3.h:36