vtkPVKeyFrameCueManipulator.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: vtkPVKeyFrameCueManipulator.h
5 
6  Copyright (c) Kitware, Inc.
7  All rights reserved.
8  See Copyright.txt or http://www.paraview.org/HTML/Copyright.html 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 =========================================================================*/
37 #ifndef vtkPVKeyFrameCueManipulator_h
38 #define vtkPVKeyFrameCueManipulator_h
39 
40 #include "vtkPVCueManipulator.h"
41 
42 class vtkPVKeyFrameCueManipulatorInternals;
43 class vtkPVKeyFrameCueManipulatorObserver;
44 class vtkPVKeyFrame;
45 
47 {
48 public:
50  void PrintSelf(ostream& os, vtkIndent indent) override;
52 
59  int AddKeyFrame(vtkPVKeyFrame* keyframe);
60 
62 
68  vtkGetMacro(LastAddedKeyFrameIndex, int);
70 
74  void RemoveKeyFrame(vtkPVKeyFrame* keyframe);
75 
79  void RemoveAllKeyFrames();
80 
85  vtkPVKeyFrame* GetKeyFrame(double time);
86 
88 
98  vtkPVKeyFrame* GetStartKeyFrame(double time);
99  vtkPVKeyFrame* GetEndKeyFrame(double time);
101 
103 
107  vtkPVKeyFrame* GetNextKeyFrame(vtkPVKeyFrame* keyFrame);
108  vtkPVKeyFrame* GetPreviousKeyFrame(vtkPVKeyFrame* keyFrame);
110 
114  unsigned int GetNumberOfKeyFrames();
115 
120  vtkPVKeyFrame* GetKeyFrameAtIndex(int index);
121 
123 
130 protected:
132  ~vtkPVKeyFrameCueManipulator() override;
134 
149  void Initialize(vtkPVAnimationCue*) override;
150 
151  void Finalize(vtkPVAnimationCue*) override;
152 
153  vtkPVKeyFrameCueManipulatorInternals* Internals;
158  void UpdateValue(double currenttime, vtkPVAnimationCue* cueproxy) override;
159 
160  int AddKeyFrameInternal(vtkPVKeyFrame* keyframe);
161  int RemoveKeyFrameInternal(vtkPVKeyFrame* keyframe);
162 
163  friend class vtkPVKeyFrameCueManipulatorObserver;
164  vtkPVKeyFrameCueManipulatorObserver* Observer;
165  void ExecuteEvent(vtkObject* obj, unsigned long event, void*);
166 
169 
170 private:
172  void operator=(const vtkPVKeyFrameCueManipulator&) = delete;
173 };
174 
175 #endif
vtkPVKeyFrameCueManipulatorInternals * Internals
proxy for vtkAnimationCue.
animation manipulator that uses keyframes to generate the animation.
void PrintSelf(ostream &os, vtkIndent indent) override
virtual void Finalize(vtkPVAnimationCue *)
This method is called when the AnimationCue's EndAnimationCueEvent is triggered.
abstract proxy for manipulators used in animation.
#define VTKREMOTINGANIMATION_EXPORT
Base class for key frames.
Definition: vtkPVKeyFrame.h:36
static vtkObject * New()
virtual void UpdateValue(double currenttime, vtkPVAnimationCue *cueproxy)=0
This updates the values based on currenttime.
virtual void Initialize(vtkPVAnimationCue *)
This method is called when the AnimationCue's StartAnimationCueEvent is triggered, to let the animation manipulator know that the cue has been restarted.
vtkPVKeyFrameCueManipulatorObserver * Observer