VTK  9.3.1
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
40 #ifndef vtkCameraInterpolator_h
41 #define vtkCameraInterpolator_h
42 
43 #include "vtkObject.h"
44 #include "vtkRenderingCoreModule.h" // For export macro
45 
46 VTK_ABI_NAMESPACE_BEGIN
47 class vtkCamera;
48 class vtkCameraList;
50 class vtkCameraList;
51 
52 class VTKRENDERINGCORE_EXPORT vtkCameraInterpolator : public vtkObject
53 {
54 public:
56  void PrintSelf(ostream& os, vtkIndent indent) override;
57 
61  static vtkCameraInterpolator* New();
62 
66  int GetNumberOfCameras();
67 
69 
73  double GetMinimumT();
74  double GetMaximumT();
76 
80  void Initialize();
81 
88  void AddCamera(double t, vtkCamera* camera);
89 
94  void RemoveCamera(double t);
95 
101  void InterpolateCamera(double t, vtkCamera* camera);
102 
106  enum
107  {
108  INTERPOLATION_TYPE_LINEAR = 0,
110  INTERPOLATION_TYPE_MANUAL
111  };
112 
114 
124  vtkSetClampMacro(InterpolationType, int, INTERPOLATION_TYPE_LINEAR, INTERPOLATION_TYPE_MANUAL);
125  vtkGetMacro(InterpolationType, int);
126  void SetInterpolationTypeToLinear() { this->SetInterpolationType(INTERPOLATION_TYPE_LINEAR); }
127  void SetInterpolationTypeToSpline() { this->SetInterpolationType(INTERPOLATION_TYPE_SPLINE); }
128  void SetInterpolationTypeToManual() { this->SetInterpolationType(INTERPOLATION_TYPE_MANUAL); }
130 
132 
138  virtual void SetPositionInterpolator(vtkTupleInterpolator*);
139  vtkGetObjectMacro(PositionInterpolator, vtkTupleInterpolator);
141 
143 
149  virtual void SetFocalPointInterpolator(vtkTupleInterpolator*);
150  vtkGetObjectMacro(FocalPointInterpolator, vtkTupleInterpolator);
152 
154 
160  virtual void SetViewUpInterpolator(vtkTupleInterpolator*);
161  vtkGetObjectMacro(ViewUpInterpolator, vtkTupleInterpolator);
163 
165 
171  virtual void SetViewAngleInterpolator(vtkTupleInterpolator*);
172  vtkGetObjectMacro(ViewAngleInterpolator, vtkTupleInterpolator);
174 
176 
182  virtual void SetParallelScaleInterpolator(vtkTupleInterpolator*);
183  vtkGetObjectMacro(ParallelScaleInterpolator, vtkTupleInterpolator);
185 
187 
193  virtual void SetClippingRangeInterpolator(vtkTupleInterpolator*);
194  vtkGetObjectMacro(ClippingRangeInterpolator, vtkTupleInterpolator);
196 
201  vtkMTimeType GetMTime() override;
202 
203 protected:
205  ~vtkCameraInterpolator() override;
206 
207  // Control the interpolation type
209 
210  // These perform the interpolation
217 
218  // Initialize the interpolating splines
221  void InitializeInterpolation();
222 
223  // Hold the list of cameras. PIMPL'd STL list.
224  vtkCameraList* CameraList;
225 
226 private:
228  void operator=(const vtkCameraInterpolator&) = delete;
229 };
230 
231 VTK_ABI_NAMESPACE_END
232 #endif
abstract base class for most VTK objects
Definition: vtkObject.h:51
interpolate a series of cameras to update a new camera
vtkTupleInterpolator * ViewUpInterpolator
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:270
interpolate a tuple of arbitrary size
record modification and/or execution time
Definition: vtkTimeStamp.h:24
void SetInterpolationTypeToLinear()
These are convenience methods to switch between linear and spline interpolation.
vtkTupleInterpolator * ViewAngleInterpolator
vtkTupleInterpolator * ClippingRangeInterpolator
a simple class to control print indentation
Definition: vtkIndent.h:28
a virtual camera for 3D rendering
Definition: vtkCamera.h:40
vtkTupleInterpolator * ParallelScaleInterpolator
virtual vtkMTimeType GetMTime()
Return this object's modified time.
vtkTupleInterpolator * FocalPointInterpolator
vtkTupleInterpolator * PositionInterpolator
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
void SetInterpolationTypeToSpline()
These are convenience methods to switch between linear and spline interpolation.
void SetInterpolationTypeToManual()
These are convenience methods to switch between linear and spline interpolation.