VTK
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 
38 class vtkMatrix3x3;
39 
40 template <class Scalar>
42 {
43 public:
48  void PrintSelf(ostream& os, vtkIndent indent) override;
49 
54 
56 
59  void SetAngle(double angle);
60  vtkGetMacro(Angle, double);
62 
64 
67  void SetCenter(double* center);
68  vtkGetVector3Macro(Center, double);
70 
72 
75  void SetAxis(int axis);
76  vtkGetMacro(Axis, int);
77  void SetAxisToX(void) { this->SetAxisType(VTK_PERIODIC_ARRAY_AXIS_X); }
78  void SetAxisToY(void) { this->SetAxisType(VTK_PERIODIC_ARRAY_AXIS_Y); }
79  void SetAxisToZ(void) { this->SetAxisType(VTK_PERIODIC_ARRAY_AXIS_Z); }
81 
82 protected:
85 
89  void Transform(Scalar* tuple) const override;
90 
94  void UpdateRotationMatrix();
95 
96 private:
98  void operator=(const vtkAngularPeriodicDataArray &) = delete;
99 
100  double Angle; // Rotation angle in degrees
101  double AngleInRadians; // Rotation angle in radians
102  double Center[3]; // Rotation center
103  int Axis; // Rotation Axis
104 
105  vtkMatrix3x3* RotationMatrix;
106 };
107 
108 #include "vtkAngularPeriodicDataArray.txx"
109 
110 #endif //vtkAngularPeriodicDataArray_h
111 // VTK-HeaderTest-Exclude: vtkAngularPeriodicDataArray.h
vtkPeriodicDataArray
Map native an Array into an angulat periodic array.
Definition: vtkPeriodicDataArray.h:36
vtkAngularPeriodicDataArray::~vtkAngularPeriodicDataArray
~vtkAngularPeriodicDataArray() override
vtkAngularPeriodicDataArray::SetAxis
void SetAxis(int axis)
Set/Get the rotation axis.
vtkAngularPeriodicDataArray::vtkAngularPeriodicDataArray
vtkAngularPeriodicDataArray()
vtkObject::New
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
vtkAngularPeriodicDataArray::SetAxisToY
void SetAxisToY(void)
Definition: vtkAngularPeriodicDataArray.h:78
vtkAngularPeriodicDataArray::InitializeArray
void InitializeArray(vtkAOSDataArrayTemplate< Scalar > *inputData)
Initialize the mapped array with the original input data array.
vtkX3D::center
Definition: vtkX3D.h:230
vtkAngularPeriodicDataArray::SetAxisToX
void SetAxisToX(void)
Definition: vtkAngularPeriodicDataArray.h:77
vtkMatrix3x3
represent and manipulate 3x3 transformation matrices
Definition: vtkMatrix3x3.h:33
vtkAngularPeriodicDataArray
Map native an Array into an angulat periodic array.
Definition: vtkAngularPeriodicDataArray.h:41
vtkAngularPeriodicDataArray::SetCenter
void SetCenter(double *center)
Set/Get the rotation center.
VTK_PERIODIC_ARRAY_AXIS_Y
#define VTK_PERIODIC_ARRAY_AXIS_Y
Definition: vtkAngularPeriodicDataArray.h:35
vtkAngularPeriodicDataArray::UpdateRotationMatrix
void UpdateRotationMatrix()
Update rotation matrix from Axis, Angle and Center.
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkAngularPeriodicDataArray::SetAxisToZ
void SetAxisToZ(void)
Definition: vtkAngularPeriodicDataArray.h:79
vtkAOSArrayNewInstanceMacro
#define vtkAOSArrayNewInstanceMacro(thisClass)
Definition: vtkGenericDataArray.h:361
VTK_PERIODIC_ARRAY_AXIS_X
#define VTK_PERIODIC_ARRAY_AXIS_X
Definition: vtkAngularPeriodicDataArray.h:34
vtkAOSDataArrayTemplate< Scalar >
vtkAngularPeriodicDataArray::SetAngle
void SetAngle(double angle)
Set/Get the rotation angle in degrees.
vtkAngularPeriodicDataArray::vtkAbstractTemplateTypeMacro
vtkAbstractTemplateTypeMacro(vtkAngularPeriodicDataArray< Scalar >, vtkPeriodicDataArray< Scalar >) vtkAOSArrayNewInstanceMacro(vtkAngularPeriodicDataArray< Scalar >) static vtkAngularPeriodicDataArray *New()
vtkPeriodicDataArray.h
VTK_PERIODIC_ARRAY_AXIS_Z
#define VTK_PERIODIC_ARRAY_AXIS_Z
Definition: vtkAngularPeriodicDataArray.h:36
vtkAngularPeriodicDataArray::Transform
void Transform(Scalar *tuple) const override
Transform the provided tuple.
vtkAngularPeriodicDataArray::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.