VTK  9.1.0
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
29#ifndef vtkAngularPeriodicDataArray_h
30#define vtkAngularPeriodicDataArray_h
31
32#include "vtkPeriodicDataArray.h" // Parent
33
34#define VTK_PERIODIC_ARRAY_AXIS_X 0
35#define VTK_PERIODIC_ARRAY_AXIS_Y 1
36#define VTK_PERIODIC_ARRAY_AXIS_Z 2
37
38class vtkMatrix3x3;
39
40template <class Scalar>
42{
43public:
47 void PrintSelf(ostream& os, vtkIndent indent) override;
48
53
55
58 void SetAngle(double angle);
59 vtkGetMacro(Angle, double);
61
63
66 void SetCenter(double* center);
67 vtkGetVector3Macro(Center, double);
69
71
74 void SetAxis(int axis);
75 vtkGetMacro(Axis, int);
76 void SetAxisToX(void) { this->SetAxisType(VTK_PERIODIC_ARRAY_AXIS_X); }
77 void SetAxisToY(void) { this->SetAxisType(VTK_PERIODIC_ARRAY_AXIS_Y); }
78 void SetAxisToZ(void) { this->SetAxisType(VTK_PERIODIC_ARRAY_AXIS_Z); }
80
81protected:
84
88 void Transform(Scalar* tuple) const override;
89
94
95private:
97 void operator=(const vtkAngularPeriodicDataArray&) = delete;
98
99 double Angle; // Rotation angle in degrees
100 double AngleInRadians; // Rotation angle in radians
101 double Center[3]; // Rotation center
102 int Axis; // Rotation Axis
103
104 vtkMatrix3x3* RotationMatrix;
105};
106
107#include "vtkAngularPeriodicDataArray.txx"
108
109#endif // vtkAngularPeriodicDataArray_h
110// VTK-HeaderTest-Exclude: vtkAngularPeriodicDataArray.h
Map native an Array into an angulat periodic array.
void SetAxis(int axis)
Set/Get the rotation axis.
void InitializeArray(vtkAOSDataArrayTemplate< Scalar > *inputData)
Initialize the mapped array with the original input data array.
vtkAOSArrayNewInstanceMacro(vtkAngularPeriodicDataArray< Scalar >)
vtkAbstractTemplateTypeMacro(vtkAngularPeriodicDataArray< Scalar >, vtkPeriodicDataArray< Scalar >)
void UpdateRotationMatrix()
Update rotation matrix from Axis, Angle and Center.
void SetAxisToX(void)
Set/Get the rotation axis.
void SetAxisToY(void)
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 SetAxisToZ(void)
Set/Get the rotation axis.
void SetAngle(double angle)
Set/Get the rotation angle in degrees.
a simple class to control print indentation
Definition: vtkIndent.h:113
represent and manipulate 3x3 transformation matrices
Definition: vtkMatrix3x3.h:63
Map native an Array into an angulat periodic array.
@ center
Definition: vtkX3D.h:236
#define VTK_PERIODIC_ARRAY_AXIS_X
#define VTK_PERIODIC_ARRAY_AXIS_Y
#define VTK_PERIODIC_ARRAY_AXIS_Z