VTK  9.7.20261002
vtkCameraInterpolator.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
58
59#ifndef vtkCameraInterpolator_h
60#define vtkCameraInterpolator_h
61
62#include "vtkObject.h"
63#include "vtkRenderingCoreModule.h" // For export macro
64#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
65
66#include <vector> // for arg, return
67
68VTK_ABI_NAMESPACE_BEGIN
69class vtkCamera;
70class vtkCameraList;
72class vtkCameraList;
73
74class VTKRENDERINGCORE_EXPORT VTK_MARSHALAUTO vtkCameraInterpolator : public vtkObject
75{
76public:
78 void PrintSelf(ostream& os, vtkIndent indent) override;
79
84
89
91
95 double GetMinimumT();
96 double GetMaximumT();
98
103
110 void AddCamera(double t, vtkCamera* camera);
111
116 void RemoveCamera(double t);
117
123 void InterpolateCamera(double t, vtkCamera* camera);
124
128 enum
129 {
133 };
134
136
147 vtkGetMacro(InterpolationType, int);
152
154
163
165
174
176
185
187
196
198
207
209
218
220
236 void SetTimedCameras(const std::vector<double>& values);
237 std::vector<double> GetTimedCameras() const;
239
245
246protected:
249
250 // Control the interpolation type
252
253 // These perform the interpolation
260
261 // Initialize the interpolating splines
265
266 // Hold the list of cameras. PIMPL'd STL list.
267 vtkCameraList* CameraList;
268
269private:
271 void operator=(const vtkCameraInterpolator&) = delete;
272};
273
274VTK_ABI_NAMESPACE_END
275#endif
void SetTimedCameras(const std::vector< double > &values)
Get/Set all the (t, camera) samples as a flat interleaved array: t0, P0[0..2], FP0[0....
std::vector< double > GetTimedCameras() const
Get/Set all the (t, camera) samples as a flat interleaved array: t0, P0[0..2], FP0[0....
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.
virtual void SetInterpolationType(int)
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:151
a simple class to control print indentation
Definition vtkIndent.h:108
record modification and/or execution time
interpolate a tuple of arbitrary size
vtkTypeUInt32 vtkMTimeType
Definition vtkType.h:318
#define VTK_MARSHALAUTO