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 =========================================================================*/
52 #ifndef vtkTransformInterpolator_h
53 #define vtkTransformInterpolator_h
54 
55 #include "vtkRenderingCoreModule.h" // For export macro
56 #include "vtkObject.h"
57 
58 
59 class vtkTransform;
60 class vtkMatrix4x4;
61 class vtkProp3D;
64 class vtkTransformList;
65 
66 
68 {
69 public:
71  void PrintSelf(ostream& os, vtkIndent indent);
72 
74  static vtkTransformInterpolator* New();
75 
77  int GetNumberOfTransforms();
78 
80 
83  double GetMinimumT();
84  double GetMaximumT();
86 
88  void Initialize();
89 
91 
97  void AddTransform(double t, vtkTransform *xform);
98  void AddTransform(double t, vtkMatrix4x4 *matrix);
99  void AddTransform(double t, vtkProp3D *prop3D);
101 
104  void RemoveTransform(double t);
105 
109  void InterpolateTransform(double t, vtkTransform *xform);
110 
111 //BTX
113 
114  enum {INTERPOLATION_TYPE_LINEAR=0,
116  INTERPOLATION_TYPE_MANUAL
117  };
118 //ETX
120 
122 
129  vtkSetClampMacro(InterpolationType,int, INTERPOLATION_TYPE_LINEAR,
130  INTERPOLATION_TYPE_MANUAL);
131  vtkGetMacro(InterpolationType,int);
133  {this->SetInterpolationType(INTERPOLATION_TYPE_LINEAR);}
135  {this->SetInterpolationType(INTERPOLATION_TYPE_SPLINE);}
137  {this->SetInterpolationType(INTERPOLATION_TYPE_MANUAL);}
139 
141 
145  virtual void SetPositionInterpolator(vtkTupleInterpolator*);
146  vtkGetObjectMacro(PositionInterpolator,vtkTupleInterpolator);
148 
150 
154  virtual void SetScaleInterpolator(vtkTupleInterpolator*);
155  vtkGetObjectMacro(ScaleInterpolator,vtkTupleInterpolator);
157 
159 
163  virtual void SetRotationInterpolator(vtkQuaternionInterpolator*);
164  vtkGetObjectMacro(RotationInterpolator,vtkQuaternionInterpolator);
166 
169  unsigned long GetMTime();
170 
171 protected:
173  virtual ~vtkTransformInterpolator();
174 
175  // Control the interpolation type
177 
178  // Interpolators
182 
183  // Initialize the interpolating splines
186  void InitializeInterpolation();
187 
188  // Keep track of inserted data
189  vtkTransformList *TransformList;
190 
191 private:
192  vtkTransformInterpolator(const vtkTransformInterpolator&); // Not implemented.
193  void operator=(const vtkTransformInterpolator&); // Not implemented.
194 
195 };
196 
197 #endif
interpolate a quaternion
abstract base class for most VTK objects
Definition: vtkObject.h:61
represent and manipulate 4x4 transformation matrices
Definition: vtkMatrix4x4.h:38
interpolate a tuple of arbitray size
record modification and/or execution time
Definition: vtkTimeStamp.h:34
describes linear transformations via a 4x4 matrix
Definition: vtkTransform.h:59
represents an 3D object for placement in a rendered scene
Definition: vtkProp3D.h:42
vtkQuaternionInterpolator * RotationInterpolator
virtual void PrintSelf(ostream &os, vtkIndent indent)
virtual unsigned long GetMTime()
a simple class to control print indentation
Definition: vtkIndent.h:38
interpolate a series of transformation matrices
vtkTupleInterpolator * PositionInterpolator
vtkTupleInterpolator * ScaleInterpolator
#define VTKRENDERINGCORE_EXPORT
static vtkObject * New()