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 
77 
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 
158 
160 
167  vtkGetObjectMacro(FocalPointInterpolator, vtkTupleInterpolator);
169 
171 
178  vtkGetObjectMacro(ViewUpInterpolator, vtkTupleInterpolator);
180 
182 
189  vtkGetObjectMacro(ViewAngleInterpolator, vtkTupleInterpolator);
191 
193 
200  vtkGetObjectMacro(ParallelScaleInterpolator, vtkTupleInterpolator);
202 
204 
211  vtkGetObjectMacro(ClippingRangeInterpolator, vtkTupleInterpolator);
213 
219 
220 protected:
223 
224  // Control the interpolation type
226 
227  // These perform the interpolation
234 
235  // Initialize the interpolating splines
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
vtkCameraInterpolator::New
static vtkCameraInterpolator * New()
Instantiate the class.
vtkCameraInterpolator::RemoveCamera
void RemoveCamera(double t)
Delete the camera at a particular parameter t.
vtkCameraInterpolator::~vtkCameraInterpolator
virtual ~vtkCameraInterpolator()
vtkCameraInterpolator::SetViewUpInterpolator
virtual void SetViewUpInterpolator(vtkTupleInterpolator *)
Set/Get the tuple interpolator used to interpolate the view up portion of the camera.
vtkCameraInterpolator::FocalPointInterpolator
vtkTupleInterpolator * FocalPointInterpolator
Definition: vtkCameraInterpolator.h:229
vtkCameraInterpolator::SetInterpolationTypeToLinear
void SetInterpolationTypeToLinear()
Definition: vtkCameraInterpolator.h:140
vtkCameraInterpolator::GetMaximumT
double GetMaximumT()
vtkCameraInterpolator::SetInterpolationTypeToSpline
void SetInterpolationTypeToSpline()
Definition: vtkCameraInterpolator.h:142
vtkTimeStamp
record modification and/or execution time
Definition: vtkTimeStamp.h:36
vtkCameraInterpolator::vtkCameraInterpolator
vtkCameraInterpolator()
vtkCameraInterpolator::GetMTime
vtkMTimeType GetMTime()
Override GetMTime() because we depend on the interpolators which may be modified outside of this clas...
vtkCameraInterpolator::ParallelScaleInterpolator
vtkTupleInterpolator * ParallelScaleInterpolator
Definition: vtkCameraInterpolator.h:232
vtkObject
abstract base class for most VTK objects
Definition: vtkObject.h:60
vtkCameraInterpolator
interpolate a series of cameras to update a new camera
Definition: vtkCameraInterpolator.h:68
vtkCameraInterpolator::InitializeInterpolation
void InitializeInterpolation()
vtkCameraInterpolator::GetNumberOfCameras
int GetNumberOfCameras()
Return the number of cameras in the list of cameras.
vtkCameraInterpolator::SetPositionInterpolator
virtual void SetPositionInterpolator(vtkTupleInterpolator *)
Set/Get the tuple interpolator used to interpolate the position portion of the camera.
vtkCameraInterpolator::ViewUpInterpolator
vtkTupleInterpolator * ViewUpInterpolator
Definition: vtkCameraInterpolator.h:230
vtkCameraInterpolator::ViewAngleInterpolator
vtkTupleInterpolator * ViewAngleInterpolator
Definition: vtkCameraInterpolator.h:231
vtkMTimeType
vtkTypeUInt64 vtkMTimeType
Definition: vtkType.h:248
vtkCameraInterpolator::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
vtkCameraInterpolator::SetClippingRangeInterpolator
virtual void SetClippingRangeInterpolator(vtkTupleInterpolator *)
Set/Get the tuple interpolator used to interpolate the clipping range portion of the camera.
vtkCameraInterpolator::InterpolationType
int InterpolationType
Definition: vtkCameraInterpolator.h:225
vtkCameraInterpolator::SetInterpolationTypeToManual
void SetInterpolationTypeToManual()
Definition: vtkCameraInterpolator.h:144
vtkCameraInterpolator::AddCamera
void AddCamera(double t, vtkCamera *camera)
Add another camera to the list of cameras defining the camera function.
vtkCameraInterpolator::SetFocalPointInterpolator
virtual void SetFocalPointInterpolator(vtkTupleInterpolator *)
Set/Get the tuple interpolator used to interpolate the focal point portion of the camera.
vtkCameraInterpolator::PositionInterpolator
vtkTupleInterpolator * PositionInterpolator
Definition: vtkCameraInterpolator.h:228
vtkCameraInterpolator::SetParallelScaleInterpolator
virtual void SetParallelScaleInterpolator(vtkTupleInterpolator *)
Set/Get the tuple interpolator used to interpolate the parallel scale portion of the camera.
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:40
vtkCamera
a virtual camera for 3D rendering
Definition: vtkCamera.h:51
vtkObject.h
vtkCameraInterpolator::InitializeTime
vtkTimeStamp InitializeTime
Definition: vtkCameraInterpolator.h:237
vtkTupleInterpolator
interpolate a tuple of arbitray size
Definition: vtkTupleInterpolator.h:55
vtkCameraInterpolator::INTERPOLATION_TYPE_SPLINE
@ INTERPOLATION_TYPE_SPLINE
Definition: vtkCameraInterpolator.h:122
vtkCameraInterpolator::CameraList
vtkCameraList * CameraList
Definition: vtkCameraInterpolator.h:241
vtkCameraInterpolator::InterpolateCamera
void InterpolateCamera(double t, vtkCamera *camera)
Interpolate the list of cameras and determine a new camera (i.e., fill in the camera provided).
vtkCameraInterpolator::ClippingRangeInterpolator
vtkTupleInterpolator * ClippingRangeInterpolator
Definition: vtkCameraInterpolator.h:233
vtkCameraInterpolator::Initialized
int Initialized
Definition: vtkCameraInterpolator.h:236
vtkCameraInterpolator::GetMinimumT
double GetMinimumT()
Obtain some information about the interpolation range.
vtkX3D::PositionInterpolator
@ PositionInterpolator
Definition: vtkX3D.h:145
vtkCameraInterpolator::Initialize
void Initialize()
Clear the list of cameras.
vtkCameraInterpolator::SetViewAngleInterpolator
virtual void SetViewAngleInterpolator(vtkTupleInterpolator *)
Set/Get the tuple interpolator used to interpolate the view angle portion of the camera.