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
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
41class vtkMatrix3x3;
42
43template <class Scalar>
45{
46public:
51 void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
52
57
59
62 void SetAngle(double angle);
63 vtkGetMacro(Angle, double);
65
67
70 void SetCenter(double* center);
71 vtkGetVector3Macro(Center, double);
73
75
78 void SetAxis(int axis);
79 vtkGetMacro(Axis, int);
80 void SetAxisToX(void) { this->SetAxisType(VTK_PERIODIC_ARRAY_AXIS_X); }
81 void SetAxisToY(void) { this->SetAxisType(VTK_PERIODIC_ARRAY_AXIS_Y); }
82 void SetAxisToZ(void) { this->SetAxisType(VTK_PERIODIC_ARRAY_AXIS_Z); }
84
85protected:
88
92 void Transform(Scalar* tuple) const VTK_OVERRIDE;
93
98
99private:
100 vtkAngularPeriodicDataArray(const vtkAngularPeriodicDataArray &) VTK_DELETE_FUNCTION;
101 void operator=(const vtkAngularPeriodicDataArray &) VTK_DELETE_FUNCTION;
102
103 double Angle; // Rotation angle in degrees
104 double AngleInRadians; // Rotation angle in radians
105 double Center[3]; // Rotation center
106 int Axis; // Rotation Axis
107
108 vtkMatrix3x3* RotationMatrix;
109};
110
111#include "vtkAngularPeriodicDataArray.txx"
112
113#endif //vtkAngularPeriodicDataArray_h
114// VTK-HeaderTest-Exclude: vtkAngularPeriodicDataArray.h
Map native an Array into an angulat periodic array.
void SetAxis(int axis)
Set/Get the rotation axis.
vtkAbstractTemplateTypeMacro(vtkAngularPeriodicDataArray< Scalar >, vtkPeriodicDataArray< Scalar >) vtkAOSArrayNewInstanceMacro(vtkAngularPeriodicDataArray< Scalar >) static vtkAngularPeriodicDataArray *New()
void InitializeArray(vtkAOSDataArrayTemplate< Scalar > *inputData)
Initialize the mapped array with the original input data array.
void UpdateRotationMatrix()
Update rotation matrix from Axis, Angle and Center.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
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:40
represent and manipulate 3x3 transformation matrices
Definition: vtkMatrix3x3.h:37
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
Map native an Array into an angulat periodic array.
@ center
Definition: vtkX3D.h:230
#define VTK_PERIODIC_ARRAY_AXIS_X
#define VTK_PERIODIC_ARRAY_AXIS_Y
#define VTK_PERIODIC_ARRAY_AXIS_Z
#define vtkAOSArrayNewInstanceMacro(thisClass)