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 "vtkObject.h"
58 
59 class vtkCamera;
60 class vtkCameraList;
62 class vtkCameraList;
63 
64 
66 {
67 public:
69  void PrintSelf(ostream& os, vtkIndent indent);
70 
72  static vtkCameraInterpolator* New();
73 
75  int GetNumberOfCameras();
76 
78 
80  double GetMinimumT();
81  double GetMaximumT();
83 
85  void Initialize();
86 
91  void AddCamera(double t, vtkCamera *camera);
92 
95  void RemoveCamera(double t);
96 
100  void InterpolateCamera(double t, vtkCamera *camera);
101 
102 //BTX
104 
105  enum {INTERPOLATION_TYPE_LINEAR=0,
107  INTERPOLATION_TYPE_MANUAL
108  };
109 //ETX
111 
113 
121  vtkSetClampMacro(InterpolationType,int, INTERPOLATION_TYPE_LINEAR,
122  INTERPOLATION_TYPE_MANUAL);
123  vtkGetMacro(InterpolationType,int);
125  {this->SetInterpolationType(INTERPOLATION_TYPE_LINEAR);}
127  {this->SetInterpolationType(INTERPOLATION_TYPE_SPLINE);}
129  {this->SetInterpolationType(INTERPOLATION_TYPE_MANUAL);}
131 
133 
137  virtual void SetPositionInterpolator(vtkTupleInterpolator*);
138  vtkGetObjectMacro(PositionInterpolator,vtkTupleInterpolator);
140 
142 
146  virtual void SetFocalPointInterpolator(vtkTupleInterpolator*);
147  vtkGetObjectMacro(FocalPointInterpolator,vtkTupleInterpolator);
149 
151 
155  virtual void SetViewUpInterpolator(vtkTupleInterpolator*);
156  vtkGetObjectMacro(ViewUpInterpolator,vtkTupleInterpolator);
158 
160 
164  virtual void SetViewAngleInterpolator(vtkTupleInterpolator*);
165  vtkGetObjectMacro(ViewAngleInterpolator,vtkTupleInterpolator);
167 
169 
173  virtual void SetParallelScaleInterpolator(vtkTupleInterpolator*);
174  vtkGetObjectMacro(ParallelScaleInterpolator,vtkTupleInterpolator);
176 
178 
182  virtual void SetClippingRangeInterpolator(vtkTupleInterpolator*);
183  vtkGetObjectMacro(ClippingRangeInterpolator,vtkTupleInterpolator);
185 
188  unsigned long GetMTime();
189 
190 protected:
192  virtual ~vtkCameraInterpolator();
193 
194  // Control the interpolation type
196 
197  // These perform the interpolation
204 
205  // Initialize the interpolating splines
208  void InitializeInterpolation();
209 
210  // Hold the list of cameras. PIMPL'd STL list.
211  vtkCameraList *CameraList;
212 
213 private:
214  vtkCameraInterpolator(const vtkCameraInterpolator&); // Not implemented.
215  void operator=(const vtkCameraInterpolator&); // Not implemented.
216 
217 };
218 
219 #endif
abstract base class for most VTK objects
Definition: vtkObject.h:60
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:33
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:37
a virtual camera for 3D rendering
Definition: vtkCamera.h:47
vtkTupleInterpolator * ParallelScaleInterpolator
vtkTupleInterpolator * FocalPointInterpolator
#define VTK_RENDERING_EXPORT
vtkTupleInterpolator * PositionInterpolator
static vtkObject * New()