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 =========================================================================*/
54 #ifndef vtkQuaternionInterpolator_h
55 #define vtkQuaternionInterpolator_h
56 
57 #include "vtkCommonMathModule.h" // For export macro
58 #include "vtkObject.h"
59 
60 class vtkQuaterniond;
61 class vtkQuaternionList;
62 
64 {
65 public:
67  void PrintSelf(ostream& os, vtkIndent indent);
68 
71 
74  int GetNumberOfQuaternions();
75 
77 
81  double GetMinimumT();
82  double GetMaximumT();
84 
87  void Initialize();
88 
90 
94  void AddQuaternion(double t, const vtkQuaterniond& q);
95  void AddQuaternion(double t, double q[4]);
97 
100  void RemoveQuaternion(double t);
101 
103 
106  void InterpolateQuaternion(double t, vtkQuaterniond& q);
107  void InterpolateQuaternion(double t, double q[4]);
109 
110 //BTX
112 
113  enum {INTERPOLATION_TYPE_LINEAR=0,
114  INTERPOLATION_TYPE_SPLINE
115  };
116 //ETX
118 
120 
125  vtkSetClampMacro(InterpolationType,int,INTERPOLATION_TYPE_LINEAR,
126  INTERPOLATION_TYPE_SPLINE);
127  vtkGetMacro(InterpolationType,int);
129  {this->SetInterpolationType(INTERPOLATION_TYPE_LINEAR);}
131  {this->SetInterpolationType(INTERPOLATION_TYPE_SPLINE);}
133 
134 protected:
136  virtual ~vtkQuaternionInterpolator();
137 
138  // Specify the type of interpolation to use
140 
141  // Internal variables for interpolation functions
142  vtkQuaternionList *QuaternionList; //used for linear quaternion interpolation
143 
144 private:
145  vtkQuaternionInterpolator(const vtkQuaternionInterpolator&); // Not implemented.
146  void operator=(const vtkQuaternionInterpolator&); // Not implemented.
147 
148 };
149 
150 #endif
interpolate a quaternion
abstract base class for most VTK objects
Definition: vtkObject.h:61
virtual void PrintSelf(ostream &os, vtkIndent indent)
a simple class to control print indentation
Definition: vtkIndent.h:38
VTKWRAPPINGJAVA_EXPORT jlong q(JNIEnv *env, jobject obj)
static vtkObject * New()
#define VTKCOMMONMATH_EXPORT