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 =========================================================================*/
52 #ifndef vtkCameraInterpolator_h
53 #define vtkCameraInterpolator_h
54 
55 #include "vtkRenderingCoreModule.h" // For export macro
56 #include "vtkObject.h"
57 
58 class vtkCamera;
59 class vtkCameraList;
61 class vtkCameraList;
62 
63 
64 class VTKRENDERINGCORE_EXPORT vtkCameraInterpolator : public vtkObject
65 {
66 public:
68  void PrintSelf(ostream& os, vtkIndent indent) override;
69 
74 
79 
81 
85  double GetMinimumT();
86  double GetMaximumT();
88 
92  void Initialize();
93 
100  void AddCamera(double t, vtkCamera *camera);
101 
106  void RemoveCamera(double t);
107 
113  void InterpolateCamera(double t, vtkCamera *camera);
114 
118  enum {INTERPOLATION_TYPE_LINEAR=0,
120  INTERPOLATION_TYPE_MANUAL
121  };
122 
124 
134  vtkSetClampMacro(InterpolationType, int, INTERPOLATION_TYPE_LINEAR,
135  INTERPOLATION_TYPE_MANUAL);
136  vtkGetMacro(InterpolationType,int);
138  {this->SetInterpolationType(INTERPOLATION_TYPE_LINEAR);}
140  {this->SetInterpolationType(INTERPOLATION_TYPE_SPLINE);}
142  {this->SetInterpolationType(INTERPOLATION_TYPE_MANUAL);}
144 
146 
155 
157 
164  vtkGetObjectMacro(FocalPointInterpolator, vtkTupleInterpolator);
166 
168 
175  vtkGetObjectMacro(ViewUpInterpolator, vtkTupleInterpolator);
177 
179 
186  vtkGetObjectMacro(ViewAngleInterpolator, vtkTupleInterpolator);
188 
190 
197  vtkGetObjectMacro(ParallelScaleInterpolator, vtkTupleInterpolator);
199 
201 
208  vtkGetObjectMacro(ClippingRangeInterpolator, vtkTupleInterpolator);
210 
215  vtkMTimeType GetMTime() override;
216 
217 protected:
220 
221  // Control the interpolation type
223 
224  // These perform the interpolation
231 
232  // Initialize the interpolating splines
236 
237  // Hold the list of cameras. PIMPL'd STL list.
238  vtkCameraList *CameraList;
239 
240 private:
242  void operator=(const vtkCameraInterpolator&) = delete;
243 };
244 
245 #endif
vtkCameraInterpolator::New
static vtkCameraInterpolator * New()
Instantiate the class.
vtkCameraInterpolator::RemoveCamera
void RemoveCamera(double t)
Delete the camera at a particular parameter t.
vtkCameraInterpolator::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
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:226
vtkCameraInterpolator::SetInterpolationTypeToLinear
void SetInterpolationTypeToLinear()
Definition: vtkCameraInterpolator.h:137
vtkCameraInterpolator::GetMaximumT
double GetMaximumT()
vtkCameraInterpolator::SetInterpolationTypeToSpline
void SetInterpolationTypeToSpline()
Definition: vtkCameraInterpolator.h:139
vtkTimeStamp
record modification and/or execution time
Definition: vtkTimeStamp.h:36
vtkCameraInterpolator::vtkCameraInterpolator
vtkCameraInterpolator()
vtkCameraInterpolator::ParallelScaleInterpolator
vtkTupleInterpolator * ParallelScaleInterpolator
Definition: vtkCameraInterpolator.h:229
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:65
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:227
vtkCameraInterpolator::ViewAngleInterpolator
vtkTupleInterpolator * ViewAngleInterpolator
Definition: vtkCameraInterpolator.h:228
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:222
vtkCameraInterpolator::SetInterpolationTypeToManual
void SetInterpolationTypeToManual()
Definition: vtkCameraInterpolator.h:141
vtkCameraInterpolator::GetMTime
vtkMTimeType GetMTime() override
Override GetMTime() because we depend on the interpolators which may be modified outside of this clas...
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:225
vtkCameraInterpolator::SetParallelScaleInterpolator
virtual void SetParallelScaleInterpolator(vtkTupleInterpolator *)
Set/Get the tuple interpolator used to interpolate the parallel scale portion of the camera.
vtkCameraInterpolator::~vtkCameraInterpolator
~vtkCameraInterpolator() override
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:234
vtkTupleInterpolator
interpolate a tuple of arbitrary size
Definition: vtkTupleInterpolator.h:55
vtkCameraInterpolator::CameraList
vtkCameraList * CameraList
Definition: vtkCameraInterpolator.h:238
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:230
vtkCameraInterpolator::Initialized
int Initialized
Definition: vtkCameraInterpolator.h:233
vtkCameraInterpolator::GetMinimumT
double GetMinimumT()
Obtain some information about the interpolation range.
vtkCameraInterpolator::INTERPOLATION_TYPE_SPLINE
@ INTERPOLATION_TYPE_SPLINE
Definition: vtkCameraInterpolator.h:119
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.
vtkMTimeType
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:302