VTK
vtkQuaternionInterpolator.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkQuaternionInterpolator.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 =========================================================================*/
55 #ifndef vtkQuaternionInterpolator_h
56 #define vtkQuaternionInterpolator_h
57 
58 #include "vtkCommonMathModule.h" // For export macro
59 #include "vtkObject.h"
60 
61 class vtkQuaterniond;
62 class vtkQuaternionList;
63 
64 class VTKCOMMONMATH_EXPORT vtkQuaternionInterpolator : public vtkObject
65 {
66 public:
68  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
69 
74 
79  int GetNumberOfQuaternions();
80 
82 
88  double GetMinimumT();
89  double GetMaximumT();
91 
96  void Initialize();
97 
99 
105  void AddQuaternion(double t, const vtkQuaterniond& q);
106  void AddQuaternion(double t, double q[4]);
108 
113  void RemoveQuaternion(double t);
114 
116 
121  void InterpolateQuaternion(double t, vtkQuaterniond& q);
122  void InterpolateQuaternion(double t, double q[4]);
124 
128  enum {INTERPOLATION_TYPE_LINEAR=0,
129  INTERPOLATION_TYPE_SPLINE
130  };
131 
133 
140  vtkSetClampMacro(InterpolationType,int,INTERPOLATION_TYPE_LINEAR,
141  INTERPOLATION_TYPE_SPLINE);
142  vtkGetMacro(InterpolationType,int);
144  {this->SetInterpolationType(INTERPOLATION_TYPE_LINEAR);}
146  {this->SetInterpolationType(INTERPOLATION_TYPE_SPLINE);}
148 
149 protected:
151  ~vtkQuaternionInterpolator() VTK_OVERRIDE;
152 
153  // Specify the type of interpolation to use
154  int InterpolationType;
155 
156  // Internal variables for interpolation functions
157  vtkQuaternionList *QuaternionList; //used for linear quaternion interpolation
158 
159 private:
160  vtkQuaternionInterpolator(const vtkQuaternionInterpolator&) VTK_DELETE_FUNCTION;
161  void operator=(const vtkQuaternionInterpolator&) VTK_DELETE_FUNCTION;
162 
163 };
164 
165 #endif
interpolate a quaternion
abstract base class for most VTK objects
Definition: vtkObject.h:59
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void SetInterpolationTypeToSpline()
Specify which type of function to use for interpolation.
a simple class to control print indentation
Definition: vtkIndent.h:39
void SetInterpolationTypeToLinear()
Specify which type of function to use for interpolation.
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...