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 =========================================================================*/
55 #ifndef vtkCameraInterpolator_h
56 #define vtkCameraInterpolator_h
57 
58 #include "vtkRenderingCoreModule.h" // For export macro
59 #include "vtkObject.h"
60 
61 class vtkCamera;
62 class vtkCameraList;
64 class vtkCameraList;
65 
66 
67 class VTKRENDERINGCORE_EXPORT vtkCameraInterpolator : public vtkObject
68 {
69 public:
71  void PrintSelf(ostream& os, vtkIndent indent);
72 
76  static vtkCameraInterpolator* New();
77 
81  int GetNumberOfCameras();
82 
84 
88  double GetMinimumT();
89  double GetMaximumT();
91 
95  void Initialize();
96 
103  void AddCamera(double t, vtkCamera *camera);
104 
109  void RemoveCamera(double t);
110 
116  void InterpolateCamera(double t, vtkCamera *camera);
117 
121  enum {INTERPOLATION_TYPE_LINEAR=0,
123  INTERPOLATION_TYPE_MANUAL
124  };
125 
127 
137  vtkSetClampMacro(InterpolationType, int, INTERPOLATION_TYPE_LINEAR,
138  INTERPOLATION_TYPE_MANUAL);
139  vtkGetMacro(InterpolationType,int);
141  {this->SetInterpolationType(INTERPOLATION_TYPE_LINEAR);}
143  {this->SetInterpolationType(INTERPOLATION_TYPE_SPLINE);}
145  {this->SetInterpolationType(INTERPOLATION_TYPE_MANUAL);}
147 
149 
155  virtual void SetPositionInterpolator(vtkTupleInterpolator*);
156  vtkGetObjectMacro(PositionInterpolator, vtkTupleInterpolator);
158 
160 
166  virtual void SetFocalPointInterpolator(vtkTupleInterpolator*);
167  vtkGetObjectMacro(FocalPointInterpolator, vtkTupleInterpolator);
169 
171 
177  virtual void SetViewUpInterpolator(vtkTupleInterpolator*);
178  vtkGetObjectMacro(ViewUpInterpolator, vtkTupleInterpolator);
180 
182 
188  virtual void SetViewAngleInterpolator(vtkTupleInterpolator*);
189  vtkGetObjectMacro(ViewAngleInterpolator, vtkTupleInterpolator);
191 
193 
199  virtual void SetParallelScaleInterpolator(vtkTupleInterpolator*);
200  vtkGetObjectMacro(ParallelScaleInterpolator, vtkTupleInterpolator);
202 
204 
210  virtual void SetClippingRangeInterpolator(vtkTupleInterpolator*);
211  vtkGetObjectMacro(ClippingRangeInterpolator, vtkTupleInterpolator);
213 
219 
220 protected:
222  virtual ~vtkCameraInterpolator();
223 
224  // Control the interpolation type
226 
227  // These perform the interpolation
234 
235  // Initialize the interpolating splines
238  void InitializeInterpolation();
239 
240  // Hold the list of cameras. PIMPL'd STL list.
241  vtkCameraList *CameraList;
242 
243 private:
244  vtkCameraInterpolator(const vtkCameraInterpolator&) VTK_DELETE_FUNCTION;
245  void operator=(const vtkCameraInterpolator&) VTK_DELETE_FUNCTION;
246 };
247 
248 #endif
abstract base class for most VTK objects
Definition: vtkObject.h:59
interpolate a series of cameras to update a new camera
vtkTupleInterpolator * ViewUpInterpolator
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
interpolate a tuple of arbitray size
record modification and/or execution time
Definition: vtkTimeStamp.h:35
void SetInterpolationTypeToLinear()
These are convenience methods to switch between linear and spline interpolation.
vtkTupleInterpolator * ViewAngleInterpolator
vtkTypeUInt64 vtkMTimeType
Definition: vtkType.h:248
vtkTupleInterpolator * ClippingRangeInterpolator
a simple class to control print indentation
Definition: vtkIndent.h:39
a virtual camera for 3D rendering
Definition: vtkCamera.h:50
vtkTupleInterpolator * ParallelScaleInterpolator
virtual vtkMTimeType GetMTime()
Return this object's modified time.
vtkTupleInterpolator * FocalPointInterpolator
vtkTupleInterpolator * PositionInterpolator
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
void SetInterpolationTypeToSpline()
These are convenience methods to switch between linear and spline interpolation.
void SetInterpolationTypeToManual()
These are convenience methods to switch between linear and spline interpolation.