VTK  9.2.6
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=========================================================================*/
61#ifndef vtkCameraInterpolator_h
62#define vtkCameraInterpolator_h
63
64#include "vtkObject.h"
65#include "vtkRenderingCoreModule.h" // For export macro
66
67class vtkCamera;
68class vtkCameraList;
70class vtkCameraList;
71
72class VTKRENDERINGCORE_EXPORT vtkCameraInterpolator : public vtkObject
73{
74public:
76 void PrintSelf(ostream& os, vtkIndent indent) override;
77
82
87
89
93 double GetMinimumT();
94 double GetMaximumT();
96
101
108 void AddCamera(double t, vtkCamera* camera);
109
114 void RemoveCamera(double t);
115
121 void InterpolateCamera(double t, vtkCamera* camera);
122
126 enum
127 {
128 INTERPOLATION_TYPE_LINEAR = 0,
130 INTERPOLATION_TYPE_MANUAL
131 };
132
134
144 vtkSetClampMacro(InterpolationType, int, INTERPOLATION_TYPE_LINEAR, INTERPOLATION_TYPE_MANUAL);
145 vtkGetMacro(InterpolationType, int);
146 void SetInterpolationTypeToLinear() { this->SetInterpolationType(INTERPOLATION_TYPE_LINEAR); }
147 void SetInterpolationTypeToSpline() { this->SetInterpolationType(INTERPOLATION_TYPE_SPLINE); }
148 void SetInterpolationTypeToManual() { this->SetInterpolationType(INTERPOLATION_TYPE_MANUAL); }
150
152
159 vtkGetObjectMacro(PositionInterpolator, vtkTupleInterpolator);
161
163
170 vtkGetObjectMacro(FocalPointInterpolator, vtkTupleInterpolator);
172
174
181 vtkGetObjectMacro(ViewUpInterpolator, vtkTupleInterpolator);
183
185
192 vtkGetObjectMacro(ViewAngleInterpolator, vtkTupleInterpolator);
194
196
203 vtkGetObjectMacro(ParallelScaleInterpolator, vtkTupleInterpolator);
205
207
214 vtkGetObjectMacro(ClippingRangeInterpolator, vtkTupleInterpolator);
216
222
223protected:
226
227 // Control the interpolation type
229
230 // These perform the interpolation
237
238 // Initialize the interpolating splines
242
243 // Hold the list of cameras. PIMPL'd STL list.
244 vtkCameraList* CameraList;
245
246private:
248 void operator=(const vtkCameraInterpolator&) = delete;
249};
250
251#endif
interpolate a series of cameras to update a new camera
virtual void SetParallelScaleInterpolator(vtkTupleInterpolator *)
Set/Get the tuple interpolator used to interpolate the parallel scale portion of the camera.
vtkTupleInterpolator * ClippingRangeInterpolator
vtkTupleInterpolator * ParallelScaleInterpolator
void SetInterpolationTypeToLinear()
These are convenience methods to switch between linear and spline interpolation.
void SetInterpolationTypeToSpline()
These are convenience methods to switch between linear and spline interpolation.
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
vtkMTimeType GetMTime() override
Override GetMTime() because we depend on the interpolators which may be modified outside of this clas...
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.
~vtkCameraInterpolator() override
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.
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).
void SetInterpolationTypeToManual()
These are convenience methods to switch between linear and spline interpolation.
double GetMaximumT()
Obtain some information about the interpolation range.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
a virtual camera for 3D rendering
Definition vtkCamera.h:61
a simple class to control print indentation
Definition vtkIndent.h:49
abstract base class for most VTK objects
Definition vtkObject.h:72
record modification and/or execution time
interpolate a tuple of arbitrary size
vtkTypeUInt32 vtkMTimeType
Definition vtkType.h:287