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 "vtkObject.h"
56 
57 
58 class vtkTransform;
59 class vtkMatrix4x4;
60 class vtkProp3D;
63 class vtkTransformList;
64 
65 
67 {
68 public:
70  void PrintSelf(ostream& os, vtkIndent indent);
71 
73  static vtkTransformInterpolator* New();
74 
76  int GetNumberOfTransforms();
77 
79 
82  double GetMinimumT();
83  double GetMaximumT();
85 
87  void Initialize();
88 
90 
96  void AddTransform(double t, vtkTransform *xform);
97  void AddTransform(double t, vtkMatrix4x4 *matrix);
98  void AddTransform(double t, vtkProp3D *prop3D);
100 
103  void RemoveTransform(double t);
104 
108  void InterpolateTransform(double t, vtkTransform *xform);
109 
110 //BTX
112 
113  enum {INTERPOLATION_TYPE_LINEAR=0,
115  INTERPOLATION_TYPE_MANUAL
116  };
117 //ETX
119 
121 
128  vtkSetClampMacro(InterpolationType,int, INTERPOLATION_TYPE_LINEAR,
129  INTERPOLATION_TYPE_MANUAL);
130  vtkGetMacro(InterpolationType,int);
132  {this->SetInterpolationType(INTERPOLATION_TYPE_LINEAR);}
134  {this->SetInterpolationType(INTERPOLATION_TYPE_SPLINE);}
136  {this->SetInterpolationType(INTERPOLATION_TYPE_MANUAL);}
138 
140 
144  virtual void SetPositionInterpolator(vtkTupleInterpolator*);
145  vtkGetObjectMacro(PositionInterpolator,vtkTupleInterpolator);
147 
149 
153  virtual void SetScaleInterpolator(vtkTupleInterpolator*);
154  vtkGetObjectMacro(ScaleInterpolator,vtkTupleInterpolator);
156 
158 
162  virtual void SetRotationInterpolator(vtkQuaternionInterpolator*);
163  vtkGetObjectMacro(RotationInterpolator,vtkQuaternionInterpolator);
165 
168  unsigned long GetMTime();
169 
170 protected:
172  virtual ~vtkTransformInterpolator();
173 
174  // Control the interpolation type
176 
177  // Interpolators
181 
182  // Initialize the interpolating splines
185  void InitializeInterpolation();
186 
187  // Keep track of inserted data
188  vtkTransformList *TransformList;
189 
190 private:
191  vtkTransformInterpolator(const vtkTransformInterpolator&); // Not implemented.
192  void operator=(const vtkTransformInterpolator&); // Not implemented.
193 
194 };
195 
196 #endif
interpolate a quaternion
abstract base class for most VTK objects
Definition: vtkObject.h:60
represent and manipulate 4x4 transformation matrices
Definition: vtkMatrix4x4.h:37
interpolate a tuple of arbitray size
record modification and/or execution time
Definition: vtkTimeStamp.h:33
describes linear transformations via a 4x4 matrix
Definition: vtkTransform.h:58
represents an 3D object for placement in a rendered scene
Definition: vtkProp3D.h:41
vtkQuaternionInterpolator * RotationInterpolator
virtual void PrintSelf(ostream &os, vtkIndent indent)
virtual unsigned long GetMTime()
a simple class to control print indentation
Definition: vtkIndent.h:37
interpolate a series of transformation matrices
#define VTK_RENDERING_EXPORT
vtkTupleInterpolator * PositionInterpolator
vtkTupleInterpolator * ScaleInterpolator
static vtkObject * New()