VTK  9.7.20261002
vtkTransformInterpolator.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
40
41#ifndef vtkTransformInterpolator_h
42#define vtkTransformInterpolator_h
43
44#include "vtkObject.h"
45#include "vtkRenderingCoreModule.h" // For export macro
46#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
47
48#include <vector> // for arg, return
49
50VTK_ABI_NAMESPACE_BEGIN
51class vtkTransform;
52class vtkMatrix4x4;
53class vtkProp3D;
56class vtkTransformList;
57
58class VTKRENDERINGCORE_EXPORT VTK_MARSHALAUTO vtkTransformInterpolator : public vtkObject
59{
60public:
62 void PrintSelf(ostream& os, vtkIndent indent) override;
63
68
73
75
80 double GetMinimumT();
81 double GetMaximumT();
83
87 void Initialize();
88
90
98 void AddTransform(double t, vtkTransform* xform);
99 void AddTransform(double t, vtkMatrix4x4* matrix);
100 void AddTransform(double t, vtkProp3D* prop3D);
102
107 void RemoveTransform(double t);
108
114 void InterpolateTransform(double t, vtkTransform* xform);
115
119 enum
120 {
124 };
125
127
137 vtkGetMacro(InterpolationType, int);
142
144
153
155
164
166
175
177
190 void SetTimedTransforms(const std::vector<double>& values);
191 std::vector<double> GetTimedTransforms() const;
193
199
200protected:
203
204 // Control the interpolation type
206
207 // Interpolators
211
212 // Initialize the interpolating splines
216
217 // Keep track of inserted data
218 vtkTransformList* TransformList;
219
220private:
222 void operator=(const vtkTransformInterpolator&) = delete;
223};
224
225VTK_ABI_NAMESPACE_END
226#endif
a simple class to control print indentation
Definition vtkIndent.h:108
represent and manipulate 4x4 transformation matrices
represents an 3D object for placement in a rendered scene
Definition vtkProp3D.h:89
record modification and/or execution time
void SetInterpolationTypeToSpline()
These are convenience methods to switch between linear and spline interpolation.
virtual void SetRotationInterpolator(vtkQuaternionInterpolator *)
Set/Get the tuple interpolator used to interpolate the orientation portion of the transformation matr...
void Initialize()
Clear the list of transforms.
void AddTransform(double t, vtkTransform *xform)
Add another transform to the list of transformations defining the transform function.
void RemoveTransform(double t)
Delete the transform at a particular parameter t.
void InterpolateTransform(double t, vtkTransform *xform)
Interpolate the list of transforms and determine a new transform (i.e., fill in the transformation pr...
int GetNumberOfTransforms()
Return the number of transforms in the list of transforms.
vtkQuaternionInterpolator * RotationInterpolator
vtkTupleInterpolator * ScaleInterpolator
std::vector< double > GetTimedTransforms() const
Get/Set all the (t, transform) samples as a flat interleaved array: t0, P0[0..2], S0[0....
void SetInterpolationTypeToManual()
These are convenience methods to switch between linear and spline interpolation.
void AddTransform(double t, vtkMatrix4x4 *matrix)
Add another transform to the list of transformations defining the transform function.
void SetInterpolationTypeToLinear()
These are convenience methods to switch between linear and spline interpolation.
void AddTransform(double t, vtkProp3D *prop3D)
Add another transform to the list of transformations defining the transform function.
double GetMinimumT()
Obtain some information about the interpolation range.
static vtkTransformInterpolator * New()
Instantiate the class.
void SetTimedTransforms(const std::vector< double > &values)
Get/Set all the (t, transform) samples as a flat interleaved array: t0, P0[0..2], S0[0....
vtkMTimeType GetMTime() override
Override GetMTime() because we depend on the interpolators which may be modified outside of this clas...
virtual void SetPositionInterpolator(vtkTupleInterpolator *)
Set/Get the tuple interpolator used to interpolate the position portion of the transformation matrix.
double GetMaximumT()
Obtain some information about the interpolation range.
~vtkTransformInterpolator() override
virtual void SetScaleInterpolator(vtkTupleInterpolator *)
Set/Get the tuple interpolator used to interpolate the scale portion of the transformation matrix.
virtual void SetInterpolationType(int)
These are convenience methods to switch between linear and spline interpolation.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkTupleInterpolator * PositionInterpolator
describes linear transformations via a 4x4 matrix
interpolate a tuple of arbitrary size
vtkTypeUInt32 vtkMTimeType
Definition vtkType.h:318
#define VTK_MARSHALAUTO