1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98
|
/*=========================================================================
Program: ParaView
Module: vtkPVCameraKeyFrame.h
Copyright (c) Kitware, Inc.
All rights reserved.
See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
/**
* @class vtkPVCameraKeyFrame
*
* Special key frame for animating Camera. Unlike typical keyframes,
* this keyframe interpolates a camera and not a property on the camera.
*/
#ifndef vtkPVCameraKeyFrame_h
#define vtkPVCameraKeyFrame_h
#include "vtkPVAnimationModule.h" //needed for exports
#include "vtkPVKeyFrame.h"
class vtkCamera;
class vtkCameraInterpolator2;
class vtkPVAnimationCue;
class VTKPVANIMATION_EXPORT vtkPVCameraKeyFrame : public vtkPVKeyFrame
{
public:
static vtkPVCameraKeyFrame* New();
vtkTypeMacro(vtkPVCameraKeyFrame, vtkPVKeyFrame);
void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
/**
* If the vtkPVCameraCueManipulator is in CAMERA mode, then this method is
* not even called since the interpolation is done by vtkCameraInterpolator
* maintained by vtkPVCameraCueManipulator itself. However, in PATH mode,
* this method is called to allow the key frame to use vtkCameraInterpolator2
* to do path-based interpolations for the camera.
*/
virtual void UpdateValue(
double currenttime, vtkPVAnimationCue* cue, vtkPVKeyFrame* next) VTK_OVERRIDE;
// Overridden, since these methods are not supported by this class.
virtual void SetKeyValue(unsigned int, double) VTK_OVERRIDE {}
virtual void SetKeyValue(double) VTK_OVERRIDE {}
virtual double GetKeyValue(unsigned int) { return 0; }
//@{
/**
* Get the camera i.e. the key value for this key frame.
*/
vtkGetObjectMacro(Camera, vtkCamera);
//@}
//@{
/**
* Methods to set the current camera value.
*/
void SetPosition(double x, double y, double z);
void SetFocalPoint(double x, double y, double z);
void SetViewUp(double x, double y, double z);
void SetViewAngle(double angle);
void SetParallelScale(double scale);
//@}
//@{
/**
* Forwarded to vtkCameraInterpolator2.
*/
void AddPositionPathPoint(double x, double y, double z);
void ClearPositionPath();
void AddFocalPathPoint(double x, double y, double z);
void ClearFocalPath();
void SetFocalPointMode(int val);
void SetPositionMode(int val);
void SetClosedFocalPath(bool val);
void SetClosedPositionPath(bool val);
//@}
protected:
vtkPVCameraKeyFrame();
~vtkPVCameraKeyFrame();
vtkCamera* Camera;
vtkCameraInterpolator2* Interpolator;
private:
vtkPVCameraKeyFrame(const vtkPVCameraKeyFrame&) VTK_DELETE_FUNCTION;
void operator=(const vtkPVCameraKeyFrame&) VTK_DELETE_FUNCTION;
};
#endif
|