VTK  9.0.1
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 "vtkObject.h"
53 #include "vtkRenderingCoreModule.h" // For export macro
54 
55 class vtkCamera;
56 class vtkCameraList;
58 class vtkCameraList;
59 
60 class VTKRENDERINGCORE_EXPORT vtkCameraInterpolator : public vtkObject
61 {
62 public:
64  void PrintSelf(ostream& os, vtkIndent indent) override;
65 
70 
75 
77 
81  double GetMinimumT();
82  double GetMaximumT();
84 
88  void Initialize();
89 
96  void AddCamera(double t, vtkCamera* camera);
97 
102  void RemoveCamera(double t);
103 
109  void InterpolateCamera(double t, vtkCamera* camera);
110 
114  enum
115  {
116  INTERPOLATION_TYPE_LINEAR = 0,
118  INTERPOLATION_TYPE_MANUAL
119  };
120 
122 
132  vtkSetClampMacro(InterpolationType, int, INTERPOLATION_TYPE_LINEAR, INTERPOLATION_TYPE_MANUAL);
133  vtkGetMacro(InterpolationType, int);
134  void SetInterpolationTypeToLinear() { this->SetInterpolationType(INTERPOLATION_TYPE_LINEAR); }
135  void SetInterpolationTypeToSpline() { this->SetInterpolationType(INTERPOLATION_TYPE_SPLINE); }
136  void SetInterpolationTypeToManual() { this->SetInterpolationType(INTERPOLATION_TYPE_MANUAL); }
138 
140 
149 
151 
158  vtkGetObjectMacro(FocalPointInterpolator, vtkTupleInterpolator);
160 
162 
169  vtkGetObjectMacro(ViewUpInterpolator, vtkTupleInterpolator);
171 
173 
180  vtkGetObjectMacro(ViewAngleInterpolator, vtkTupleInterpolator);
182 
184 
191  vtkGetObjectMacro(ParallelScaleInterpolator, vtkTupleInterpolator);
193 
195 
202  vtkGetObjectMacro(ClippingRangeInterpolator, vtkTupleInterpolator);
204 
209  vtkMTimeType GetMTime() override;
210 
211 protected:
214 
215  // Control the interpolation type
217 
218  // These perform the interpolation
225 
226  // Initialize the interpolating splines
230 
231  // Hold the list of cameras. PIMPL'd STL list.
232  vtkCameraList* CameraList;
233 
234 private:
236  void operator=(const vtkCameraInterpolator&) = delete;
237 };
238 
239 #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:220
vtkCameraInterpolator::SetInterpolationTypeToLinear
void SetInterpolationTypeToLinear()
Definition: vtkCameraInterpolator.h:134
vtkCameraInterpolator::GetMaximumT
double GetMaximumT()
vtkCameraInterpolator::SetInterpolationTypeToSpline
void SetInterpolationTypeToSpline()
Definition: vtkCameraInterpolator.h:135
vtkTimeStamp
record modification and/or execution time
Definition: vtkTimeStamp.h:33
vtkCameraInterpolator::vtkCameraInterpolator
vtkCameraInterpolator()
vtkCameraInterpolator::ParallelScaleInterpolator
vtkTupleInterpolator * ParallelScaleInterpolator
Definition: vtkCameraInterpolator.h:223
vtkObject
abstract base class for most VTK objects
Definition: vtkObject.h:54
vtkCameraInterpolator
interpolate a series of cameras to update a new camera
Definition: vtkCameraInterpolator.h:61
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:221
vtkCameraInterpolator::ViewAngleInterpolator
vtkTupleInterpolator * ViewAngleInterpolator
Definition: vtkCameraInterpolator.h:222
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:216
vtkCameraInterpolator::SetInterpolationTypeToManual
void SetInterpolationTypeToManual()
Definition: vtkCameraInterpolator.h:136
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:219
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:34
vtkCamera
a virtual camera for 3D rendering
Definition: vtkCamera.h:46
vtkObject.h
vtkCameraInterpolator::InitializeTime
vtkTimeStamp InitializeTime
Definition: vtkCameraInterpolator.h:228
vtkTupleInterpolator
interpolate a tuple of arbitrary size
Definition: vtkTupleInterpolator.h:54
vtkCameraInterpolator::CameraList
vtkCameraList * CameraList
Definition: vtkCameraInterpolator.h:232
vtkCameraInterpolator::INTERPOLATION_TYPE_SPLINE
@ INTERPOLATION_TYPE_SPLINE
Definition: vtkCameraInterpolator.h:117
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:224
vtkCameraInterpolator::Initialized
int Initialized
Definition: vtkCameraInterpolator.h:227
vtkCameraInterpolator::GetMinimumT
double GetMinimumT()
Obtain some information about the interpolation range.
vtkX3D::PositionInterpolator
@ PositionInterpolator
Definition: vtkX3D.h:151
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:293