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
61class vtkCamera;
62class vtkCameraList;
64class vtkCameraList;
65
66
67class VTKRENDERINGCORE_EXPORT vtkCameraInterpolator : public vtkObject
68{
69public:
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
220protected:
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
243private:
244 vtkCameraInterpolator(const vtkCameraInterpolator&) VTK_DELETE_FUNCTION;
245 void operator=(const vtkCameraInterpolator&) VTK_DELETE_FUNCTION;
246};
247
248#endif
interpolate a series of cameras to update a new camera
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
virtual ~vtkCameraInterpolator()
virtual void SetParallelScaleInterpolator(vtkTupleInterpolator *)
Set/Get the tuple interpolator used to interpolate the parallel scale portion of the camera.
vtkTupleInterpolator * ClippingRangeInterpolator
vtkTupleInterpolator * ParallelScaleInterpolator
void Initialize()
Clear the list of cameras.
virtual void SetClippingRangeInterpolator(vtkTupleInterpolator *)
Set/Get the tuple interpolator used to interpolate the clipping range portion of the camera.
virtual void SetPositionInterpolator(vtkTupleInterpolator *)
Set/Get the tuple interpolator used to interpolate the position portion of the camera.
virtual void SetFocalPointInterpolator(vtkTupleInterpolator *)
Set/Get the tuple interpolator used to interpolate the focal point portion of the camera.
static vtkCameraInterpolator * New()
Instantiate the class.
vtkTupleInterpolator * ViewUpInterpolator
vtkTupleInterpolator * ViewAngleInterpolator
int GetNumberOfCameras()
Return the number of cameras in the list of cameras.
vtkTupleInterpolator * FocalPointInterpolator
vtkTupleInterpolator * PositionInterpolator
void RemoveCamera(double t)
Delete the camera at a particular parameter t.
virtual void SetViewUpInterpolator(vtkTupleInterpolator *)
Set/Get the tuple interpolator used to interpolate the view up portion of the camera.
void AddCamera(double t, vtkCamera *camera)
Add another camera to the list of cameras defining the camera function.
virtual void SetViewAngleInterpolator(vtkTupleInterpolator *)
Set/Get the tuple interpolator used to interpolate the view angle portion of the camera.
vtkMTimeType GetMTime()
Override GetMTime() because we depend on the interpolators which may be modified outside of this clas...
double GetMinimumT()
Obtain some information about the interpolation range.
void InterpolateCamera(double t, vtkCamera *camera)
Interpolate the list of cameras and determine a new camera (i.e., fill in the camera provided).
a virtual camera for 3D rendering
Definition: vtkCamera.h:51
a simple class to control print indentation
Definition: vtkIndent.h:40
abstract base class for most VTK objects
Definition: vtkObject.h:60
record modification and/or execution time
Definition: vtkTimeStamp.h:36
interpolate a tuple of arbitray size
@ PositionInterpolator
Definition: vtkX3D.h:145
vtkTypeUInt64 vtkMTimeType
Definition: vtkType.h:248