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 
31 #ifndef vtkAngularPeriodicDataArray_h
32 #define vtkAngularPeriodicDataArray_h
33 
34 #include "vtkPeriodicDataArray.h" // Parent
35 
36 #define VTK_PERIODIC_ARRAY_AXIS_X 0
37 #define VTK_PERIODIC_ARRAY_AXIS_Y 1
38 #define VTK_PERIODIC_ARRAY_AXIS_Z 2
39 
40 class vtkMatrix3x3;
41 
42 template <class Scalar>
44 {
45 public:
48  virtual void PrintSelf(ostream &os, vtkIndent indent);
49 
51 
52  void SetAngle(double angle);
53  vtkGetMacro(Angle, double);
55 
57 
58  void SetCenter(double* center);
59  vtkGetVector3Macro(Center, double);
61 
63 
64  void SetAxis(int axis);
65  vtkGetMacro(Axis, int);
66  void SetAxisToX(void) { this->SetAxisType(VTK_PERIODIC_ARRAY_AXIS_X); }
67  void SetAxisToY(void) { this->SetAxisType(VTK_PERIODIC_ARRAY_AXIS_Y); }
68  void SetAxisToZ(void) { this->SetAxisType(VTK_PERIODIC_ARRAY_AXIS_Z); }
70 
71 protected:
74 
76  virtual void Transform(Scalar* tuple);
77 
79  void UpdateRotationMatrix();
80 
81 private:
82  vtkAngularPeriodicDataArray(const vtkAngularPeriodicDataArray &); // Not implemented.
83  void operator=(const vtkAngularPeriodicDataArray &); // Not implemented.
84 
85  double Angle; // Rotation angle in degrees
86  double AngleInRadians; // Rotation angle in radians
87  double Center[3]; // Rotation center
88  int Axis; // Rotation Axis
89 
90  vtkMatrix3x3* RotationMatrix;
91 };
92 
93 #include "vtkAngularPeriodicDataArray.txx"
94 
95 #endif //vtkAngularPeriodicDataArray_h
96 // VTK-HeaderTest-Exclude: vtkAngularPeriodicDataArray.h
void SetCenter(double *center)
void SetAngle(double angle)
Map native an Array into an angulat periodic array.
Map native an Array into an angulat periodic array.
#define VTK_PERIODIC_ARRAY_AXIS_Z
a simple class to control print indentation
Definition: vtkIndent.h:38
vtkMappedDataArrayNewInstanceMacro(vtkAngularPeriodicDataArray< Scalar >)
#define VTK_PERIODIC_ARRAY_AXIS_Y
static vtkAngularPeriodicDataArray * New()
virtual void Transform(Scalar *tuple)
#define VTK_PERIODIC_ARRAY_AXIS_X
represent and manipulate 3x3 transformation matrices
Definition: vtkMatrix3x3.h:35
virtual void PrintSelf(ostream &os, vtkIndent indent)