VTK  9.7.20261008
vtkQuaternionInterpolator.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
45
46#ifndef vtkQuaternionInterpolator_h
47#define vtkQuaternionInterpolator_h
48
49#include "vtkCommonMathModule.h" // For export macro
50#include "vtkObject.h"
51#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
52
53#include <vector> // for arg, return
54
55VTK_ABI_NAMESPACE_BEGIN
56class vtkQuaterniond;
57class vtkQuaternionList;
58
59class VTKCOMMONMATH_EXPORT VTK_MARSHALAUTO vtkQuaternionInterpolator : public vtkObject
60{
61public:
63 void PrintSelf(ostream& os, vtkIndent indent) override;
64
69
76
82
84
90 double GetMinimumT();
91 double GetMaximumT();
93
98 void Initialize();
99
101
107 void AddQuaternion(double t, const vtkQuaterniond& q);
108 void AddQuaternion(double t, double q[4]);
110
115 void RemoveQuaternion(double t);
116
118
124 void InterpolateQuaternion(double t, double q[4]);
126
128
134 void SetSearchMethod(int type);
136
140 enum
141 {
144 };
145
147
156 vtkGetMacro(InterpolationType, int);
160
162
170 void SetTimedQuaternions(const std::vector<double>& values);
171 std::vector<double> GetTimedQuaternions() const;
173
174protected:
177
178 // Specify the type of interpolation to use
181
182 // Internal variables for interpolation functions
183 vtkQuaternionList* QuaternionList; // used for linear quaternion interpolation
184
185private:
187 void operator=(const vtkQuaternionInterpolator&) = delete;
188};
189
190VTK_ABI_NAMESPACE_END
191#endif
a simple class to control print indentation
Definition vtkIndent.h:108
double GetMaximumT()
Obtain some information about the interpolation range.
void InterpolateQuaternion(double t, vtkQuaterniond &q)
Interpolate the list of quaternions and determine a new quaternion (i.e., fill in the quaternion prov...
void AddQuaternion(double t, const vtkQuaterniond &q)
Add another quaternion to the list of quaternions to be interpolated.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void SetInterpolationTypeToLinear()
Specify which type of function to use for interpolation.
void Initialize()
Reset the class so that it contains no data; i.e., the array of (t,q[4]) information is discarded.
void RemoveQuaternion(double t)
Delete the quaternion at a particular parameter t.
double GetMinimumT()
Obtain some information about the interpolation range.
int GetSearchMethod()
Set / Get the search type method.
void AddQuaternion(double t, double q[4])
Add another quaternion to the list of quaternions to be interpolated.
static vtkQuaternionInterpolator * New()
Instantiate the class.
void SetTimedQuaternions(const std::vector< double > &values)
Get/Set all the (t, quaternion) samples as a flat interleaved array: t0, q0_0, q0_1,...
void SetInterpolationTypeToSpline()
Specify which type of function to use for interpolation.
int GetNumberOfQuaternions()
Return the number of quaternions in the list of quaternions to be interpolated.
virtual void SetInterpolationType(int)
Specify which type of function to use for interpolation.
~vtkQuaternionInterpolator() override
std::vector< double > GetTimedQuaternions() const
Get/Set all the (t, quaternion) samples as a flat interleaved array: t0, q0_0, q0_1,...
void SetSearchMethod(int type)
Set / Get the search type method.
void InterpolateQuaternion(double t, double q[4])
Interpolate the list of quaternions and determine a new quaternion (i.e., fill in the quaternion prov...
#define VTK_MARSHALAUTO