VTK
vtkTransformInterpolator.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkTransformInterpolator.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=========================================================================*/
53#ifndef vtkTransformInterpolator_h
54#define vtkTransformInterpolator_h
55
56#include "vtkRenderingCoreModule.h" // For export macro
57#include "vtkObject.h"
58
59
60class vtkTransform;
61class vtkMatrix4x4;
62class vtkProp3D;
65class vtkTransformList;
66
67
68class VTKRENDERINGCORE_EXPORT vtkTransformInterpolator : public vtkObject
69{
70public:
72 void PrintSelf(ostream& os, vtkIndent indent);
73
78
83
85
90 double GetMinimumT();
91 double GetMaximumT();
93
97 void Initialize();
98
100
108 void AddTransform(double t, vtkTransform *xform);
109 void AddTransform(double t, vtkMatrix4x4 *matrix);
110 void AddTransform(double t, vtkProp3D *prop3D);
112
117 void RemoveTransform(double t);
118
124 void InterpolateTransform(double t, vtkTransform *xform);
125
129 enum {INTERPOLATION_TYPE_LINEAR=0,
131 INTERPOLATION_TYPE_MANUAL
132 };
133
135
144 vtkSetClampMacro(InterpolationType,int, INTERPOLATION_TYPE_LINEAR,
145 INTERPOLATION_TYPE_MANUAL);
146 vtkGetMacro(InterpolationType,int);
148 {this->SetInterpolationType(INTERPOLATION_TYPE_LINEAR);}
150 {this->SetInterpolationType(INTERPOLATION_TYPE_SPLINE);}
152 {this->SetInterpolationType(INTERPOLATION_TYPE_MANUAL);}
154
156
165
167
174 vtkGetObjectMacro(ScaleInterpolator,vtkTupleInterpolator);
176
178
185 vtkGetObjectMacro(RotationInterpolator,vtkQuaternionInterpolator);
187
193
194protected:
197
198 // Control the interpolation type
200
201 // Interpolators
205
206 // Initialize the interpolating splines
210
211 // Keep track of inserted data
212 vtkTransformList *TransformList;
213
214private:
215 vtkTransformInterpolator(const vtkTransformInterpolator&) VTK_DELETE_FUNCTION;
216 void operator=(const vtkTransformInterpolator&) VTK_DELETE_FUNCTION;
217
218};
219
220#endif
a simple class to control print indentation
Definition: vtkIndent.h:40
represent and manipulate 4x4 transformation matrices
Definition: vtkMatrix4x4.h:42
abstract base class for most VTK objects
Definition: vtkObject.h:60
represents an 3D object for placement in a rendered scene
Definition: vtkProp3D.h:47
record modification and/or execution time
Definition: vtkTimeStamp.h:36
interpolate a series of transformation matrices
virtual void SetRotationInterpolator(vtkQuaternionInterpolator *)
Set/Get the tuple interpolator used to interpolate the orientation portion of the transformation matr...
virtual ~vtkTransformInterpolator()
void Initialize()
Clear the list of transforms.
vtkMTimeType GetMTime()
Override GetMTime() because we depend on the interpolators which may be modified outside of this clas...
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
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
vtkTupleInterpolator * ScaleInterpolator
void AddTransform(double t, vtkMatrix4x4 *matrix)
void AddTransform(double t, vtkProp3D *prop3D)
double GetMinimumT()
Obtain some information about the interpolation range.
static vtkTransformInterpolator * New()
Instantiate the class.
virtual void SetPositionInterpolator(vtkTupleInterpolator *)
Set/Get the tuple interpolator used to interpolate the position portion of the transformation matrix.
virtual void SetScaleInterpolator(vtkTupleInterpolator *)
Set/Get the tuple interpolator used to interpolate the scale portion of the transformation matrix.
vtkTupleInterpolator * PositionInterpolator
describes linear transformations via a 4x4 matrix
Definition: vtkTransform.h:61
interpolate a tuple of arbitray size
@ PositionInterpolator
Definition: vtkX3D.h:145
vtkTypeUInt64 vtkMTimeType
Definition: vtkType.h:248