vtkAnimationPlayer.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: vtkAnimationPlayer.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 =========================================================================*/
21 #ifndef vtkAnimationPlayer_h
22 #define vtkAnimationPlayer_h
23 
24 #include "vtkObject.h"
25 #include "vtkRemotingAnimationModule.h" // needed for export macro
26 #include "vtkWeakPointer.h" // needed for vtkWeakPointer.
27 
30 {
31 public:
32  vtkTypeMacro(vtkAnimationPlayer, vtkObject);
33  void PrintSelf(ostream& os, vtkIndent indent) override;
34 
36 
40  virtual void SetAnimationScene(vtkSMAnimationScene*);
41  vtkSMAnimationScene* GetAnimationScene();
43 
48  void Play();
49 
53  void Stop();
54 
58  int IsInPlay() { return this->InPlay ? 1 : 0; }
59  vtkGetMacro(InPlay, bool);
60 
62 
65  vtkSetMacro(Loop, bool);
66  vtkGetMacro(Loop, bool);
68 
72  void GoToNext();
73 
77  void GoToPrevious();
78 
82  void GoToFirst();
83 
87  void GoToLast();
88 
89 protected:
91  ~vtkAnimationPlayer() override;
92 
94 
95  virtual void StartLoop(
96  double starttime, double endtime, double curtime, double* playbackWindow) = 0;
97  virtual void EndLoop() = 0;
98 
102  virtual double GetNextTime(double currentime) = 0;
103 
104  virtual double GoToNext(double start, double end, double currenttime) = 0;
105  virtual double GoToPrevious(double start, double end, double currenttime) = 0;
106 
107 private:
108  vtkAnimationPlayer(const vtkAnimationPlayer&) = delete;
109  void operator=(const vtkAnimationPlayer&) = delete;
110 
112  bool InPlay;
113  bool StopPlay;
114  bool Loop;
115  double CurrentTime;
116 };
117 
118 #endif
int IsInPlay()
Returns if the animation is currently playing.
Abstract superclass for an animation player.
void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
void EndLoop() override
Delegated to the active animation player.
void StartLoop(double starttime, double endtime, double curtime, double *playbackWindow) override
Delegated to the active animation player.
This is composite animation player that can me made to play an animation using the active player...
animation scene for ParaView.
void GoToPrevious()
Take animation scene to previous frame.
double GetNextTime(double currentime) override
Delegated to the active animation player.
#define VTKREMOTINGANIMATION_EXPORT
void GoToNext()
Take the animation scene to next frame.
void operator=(const vtkObjectBase &)