vtkPVKeyFrameCueManipulator.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2 // SPDX-License-Identifier: BSD-3-Clause
25 #ifndef vtkPVKeyFrameCueManipulator_h
26 #define vtkPVKeyFrameCueManipulator_h
27 
28 #include "vtkPVCueManipulator.h"
29 
30 class vtkPVKeyFrameCueManipulatorInternals;
31 class vtkPVKeyFrameCueManipulatorObserver;
32 class vtkPVKeyFrame;
33 
35 {
36 public:
38  void PrintSelf(ostream& os, vtkIndent indent) override;
40 
47  int AddKeyFrame(vtkPVKeyFrame* keyframe);
48 
50 
56  vtkGetMacro(LastAddedKeyFrameIndex, int);
58 
62  void RemoveKeyFrame(vtkPVKeyFrame* keyframe);
63 
67  void RemoveAllKeyFrames();
68 
73  vtkPVKeyFrame* GetKeyFrame(double time);
74 
76 
86  vtkPVKeyFrame* GetStartKeyFrame(double time);
87  vtkPVKeyFrame* GetEndKeyFrame(double time);
89 
91 
95  vtkPVKeyFrame* GetNextKeyFrame(vtkPVKeyFrame* keyFrame);
96  vtkPVKeyFrame* GetPreviousKeyFrame(vtkPVKeyFrame* keyFrame);
98 
102  unsigned int GetNumberOfKeyFrames();
103 
108  vtkPVKeyFrame* GetKeyFrameAtIndex(int index);
109 
111 
118 protected:
120  ~vtkPVKeyFrameCueManipulator() override;
122 
137  void Initialize(vtkPVAnimationCue*) override;
138 
139  void Finalize(vtkPVAnimationCue*) override;
140 
141  vtkPVKeyFrameCueManipulatorInternals* Internals;
146  void UpdateValue(double currenttime, vtkPVAnimationCue* cueproxy) override;
147 
148  int AddKeyFrameInternal(vtkPVKeyFrame* keyframe);
149  int RemoveKeyFrameInternal(vtkPVKeyFrame* keyframe);
150 
151  friend class vtkPVKeyFrameCueManipulatorObserver;
152  vtkPVKeyFrameCueManipulatorObserver* Observer;
153  void ExecuteEvent(vtkObject* obj, unsigned long event, void*);
154 
157 
158 private:
160  void operator=(const vtkPVKeyFrameCueManipulator&) = delete;
161 };
162 
163 #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:24
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