VTK
vtkCameraInterpolator.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkCameraInterpolator.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 =========================================================================*/
54 #ifndef vtkCameraInterpolator_h
55 #define vtkCameraInterpolator_h
56 
57 #include "vtkRenderingCoreModule.h" // For export macro
58 #include "vtkObject.h"
59 
60 class vtkCamera;
61 class vtkCameraList;
63 class vtkCameraList;
64 
65 
67 {
68 public:
70  void PrintSelf(ostream& os, vtkIndent indent);
71 
73  static vtkCameraInterpolator* New();
74 
76  int GetNumberOfCameras();
77 
79 
81  double GetMinimumT();
82  double GetMaximumT();
84 
86  void Initialize();
87 
92  void AddCamera(double t, vtkCamera *camera);
93 
96  void RemoveCamera(double t);
97 
101  void InterpolateCamera(double t, vtkCamera *camera);
102 
103 //BTX
105 
106  enum {INTERPOLATION_TYPE_LINEAR=0,
108  INTERPOLATION_TYPE_MANUAL
109  };
110 //ETX
112 
114 
122  vtkSetClampMacro(InterpolationType, int, INTERPOLATION_TYPE_LINEAR,
123  INTERPOLATION_TYPE_MANUAL);
124  vtkGetMacro(InterpolationType,int);
126  {this->SetInterpolationType(INTERPOLATION_TYPE_LINEAR);}
128  {this->SetInterpolationType(INTERPOLATION_TYPE_SPLINE);}
130  {this->SetInterpolationType(INTERPOLATION_TYPE_MANUAL);}
132 
134 
138  virtual void SetPositionInterpolator(vtkTupleInterpolator*);
139  vtkGetObjectMacro(PositionInterpolator, vtkTupleInterpolator);
141 
143 
147  virtual void SetFocalPointInterpolator(vtkTupleInterpolator*);
148  vtkGetObjectMacro(FocalPointInterpolator, vtkTupleInterpolator);
150 
152 
156  virtual void SetViewUpInterpolator(vtkTupleInterpolator*);
157  vtkGetObjectMacro(ViewUpInterpolator, vtkTupleInterpolator);
159 
161 
165  virtual void SetViewAngleInterpolator(vtkTupleInterpolator*);
166  vtkGetObjectMacro(ViewAngleInterpolator, vtkTupleInterpolator);
168 
170 
174  virtual void SetParallelScaleInterpolator(vtkTupleInterpolator*);
175  vtkGetObjectMacro(ParallelScaleInterpolator, vtkTupleInterpolator);
177 
179 
183  virtual void SetClippingRangeInterpolator(vtkTupleInterpolator*);
184  vtkGetObjectMacro(ClippingRangeInterpolator, vtkTupleInterpolator);
186 
189  unsigned long GetMTime();
190 
191 protected:
193  virtual ~vtkCameraInterpolator();
194 
195  // Control the interpolation type
197 
198  // These perform the interpolation
205 
206  // Initialize the interpolating splines
209  void InitializeInterpolation();
210 
211  // Hold the list of cameras. PIMPL'd STL list.
212  vtkCameraList *CameraList;
213 
214 private:
215  vtkCameraInterpolator(const vtkCameraInterpolator&); // Not implemented.
216  void operator=(const vtkCameraInterpolator&); // Not implemented.
217 };
218 
219 #endif
abstract base class for most VTK objects
Definition: vtkObject.h:61
interpolate a series of cameras to update a new camera
vtkTupleInterpolator * ViewUpInterpolator
interpolate a tuple of arbitray size
record modification and/or execution time
Definition: vtkTimeStamp.h:34
vtkTupleInterpolator * ViewAngleInterpolator
vtkTupleInterpolator * ClippingRangeInterpolator
virtual void PrintSelf(ostream &os, vtkIndent indent)
virtual unsigned long GetMTime()
a simple class to control print indentation
Definition: vtkIndent.h:38
a virtual camera for 3D rendering
Definition: vtkCamera.h:49
vtkTupleInterpolator * ParallelScaleInterpolator
vtkTupleInterpolator * FocalPointInterpolator
#define VTKRENDERINGCORE_EXPORT
vtkTupleInterpolator * PositionInterpolator
static vtkObject * New()