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 =========================================================================*/
49 #ifndef vtkCameraInterpolator_h
50 #define vtkCameraInterpolator_h
51 
52 #include "vtkRenderingCoreModule.h" // For export macro
53 #include "vtkObject.h"
54 
55 class vtkCamera;
56 class vtkCameraList;
58 class vtkCameraList;
59 
60 
61 class VTKRENDERINGCORE_EXPORT vtkCameraInterpolator : public vtkObject
62 {
63 public:
65  void PrintSelf(ostream& os, vtkIndent indent) override;
66 
70  static vtkCameraInterpolator* New();
71 
75  int GetNumberOfCameras();
76 
78 
82  double GetMinimumT();
83  double GetMaximumT();
85 
89  void Initialize();
90 
97  void AddCamera(double t, vtkCamera *camera);
98 
103  void RemoveCamera(double t);
104 
110  void InterpolateCamera(double t, vtkCamera *camera);
111 
115  enum {INTERPOLATION_TYPE_LINEAR=0,
117  INTERPOLATION_TYPE_MANUAL
118  };
119 
121 
131  vtkSetClampMacro(InterpolationType, int, INTERPOLATION_TYPE_LINEAR,
132  INTERPOLATION_TYPE_MANUAL);
133  vtkGetMacro(InterpolationType,int);
135  {this->SetInterpolationType(INTERPOLATION_TYPE_LINEAR);}
137  {this->SetInterpolationType(INTERPOLATION_TYPE_SPLINE);}
139  {this->SetInterpolationType(INTERPOLATION_TYPE_MANUAL);}
141 
143 
149  virtual void SetPositionInterpolator(vtkTupleInterpolator*);
150  vtkGetObjectMacro(PositionInterpolator, vtkTupleInterpolator);
152 
154 
160  virtual void SetFocalPointInterpolator(vtkTupleInterpolator*);
161  vtkGetObjectMacro(FocalPointInterpolator, vtkTupleInterpolator);
163 
165 
171  virtual void SetViewUpInterpolator(vtkTupleInterpolator*);
172  vtkGetObjectMacro(ViewUpInterpolator, vtkTupleInterpolator);
174 
176 
182  virtual void SetViewAngleInterpolator(vtkTupleInterpolator*);
183  vtkGetObjectMacro(ViewAngleInterpolator, vtkTupleInterpolator);
185 
187 
193  virtual void SetParallelScaleInterpolator(vtkTupleInterpolator*);
194  vtkGetObjectMacro(ParallelScaleInterpolator, vtkTupleInterpolator);
196 
198 
204  virtual void SetClippingRangeInterpolator(vtkTupleInterpolator*);
205  vtkGetObjectMacro(ClippingRangeInterpolator, vtkTupleInterpolator);
207 
212  vtkMTimeType GetMTime() override;
213 
214 protected:
216  ~vtkCameraInterpolator() override;
217 
218  // Control the interpolation type
220 
221  // These perform the interpolation
228 
229  // Initialize the interpolating splines
232  void InitializeInterpolation();
233 
234  // Hold the list of cameras. PIMPL'd STL list.
235  vtkCameraList *CameraList;
236 
237 private:
239  void operator=(const vtkCameraInterpolator&) = delete;
240 };
241 
242 #endif
abstract base class for most VTK objects
Definition: vtkObject.h:53
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.
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:302
interpolate a tuple of arbitrary size
record modification and/or execution time
Definition: vtkTimeStamp.h:32
void SetInterpolationTypeToLinear()
These are convenience methods to switch between linear and spline interpolation.
vtkTupleInterpolator * ViewAngleInterpolator
vtkTupleInterpolator * ClippingRangeInterpolator
a simple class to control print indentation
Definition: vtkIndent.h:33
a virtual camera for 3D rendering
Definition: vtkCamera.h:44
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.