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=========================================================================*/
71#ifndef vtkCameraInterpolator_h
72#define vtkCameraInterpolator_h
73
74#include "vtkObject.h"
75#include "vtkRenderingCoreModule.h" // For export macro
76
77class vtkCamera;
78class vtkCameraList;
80class vtkCameraList;
81
82class VTKRENDERINGCORE_EXPORT vtkCameraInterpolator : public vtkObject
83{
84public:
86 void PrintSelf(ostream& os, vtkIndent indent) override;
87
92
97
99
103 double GetMinimumT();
104 double GetMaximumT();
106
111
118 void AddCamera(double t, vtkCamera* camera);
119
124 void RemoveCamera(double t);
125
131 void InterpolateCamera(double t, vtkCamera* camera);
132
136 enum
137 {
138 INTERPOLATION_TYPE_LINEAR = 0,
140 INTERPOLATION_TYPE_MANUAL
141 };
142
144
154 vtkSetClampMacro(InterpolationType, int, INTERPOLATION_TYPE_LINEAR, INTERPOLATION_TYPE_MANUAL);
155 vtkGetMacro(InterpolationType, int);
156 void SetInterpolationTypeToLinear() { this->SetInterpolationType(INTERPOLATION_TYPE_LINEAR); }
157 void SetInterpolationTypeToSpline() { this->SetInterpolationType(INTERPOLATION_TYPE_SPLINE); }
158 void SetInterpolationTypeToManual() { this->SetInterpolationType(INTERPOLATION_TYPE_MANUAL); }
160
162
171
173
180 vtkGetObjectMacro(FocalPointInterpolator, vtkTupleInterpolator);
182
184
191 vtkGetObjectMacro(ViewUpInterpolator, vtkTupleInterpolator);
193
195
202 vtkGetObjectMacro(ViewAngleInterpolator, vtkTupleInterpolator);
204
206
213 vtkGetObjectMacro(ParallelScaleInterpolator, vtkTupleInterpolator);
215
217
224 vtkGetObjectMacro(ClippingRangeInterpolator, vtkTupleInterpolator);
226
232
233protected:
236
237 // Control the interpolation type
239
240 // These perform the interpolation
247
248 // Initialize the interpolating splines
252
253 // Hold the list of cameras. PIMPL'd STL list.
254 vtkCameraList* CameraList;
255
256private:
258 void operator=(const vtkCameraInterpolator&) = delete;
259};
260
261#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:161
a simple class to control print indentation
Definition: vtkIndent.h:119
abstract base class for most VTK objects
Definition: vtkObject.h:82
record modification and/or execution time
Definition: vtkTimeStamp.h:55
interpolate a tuple of arbitrary size
@ PositionInterpolator
Definition: vtkX3D.h:151
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:287