vtkCompositeAnimationPlayer.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: vtkCompositeAnimationPlayer.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 =========================================================================*/
23 #ifndef vtkCompositeAnimationPlayer_h
24 #define vtkCompositeAnimationPlayer_h
25 
26 #include "vtkAnimationPlayer.h"
27 #include "vtkRemotingAnimationModule.h" // needed for export macro
28 
32 
34 {
35 public:
38  void PrintSelf(ostream& os, vtkIndent indent) override;
39 
40  enum Modes
41  {
42  SEQUENCE = 0,
43  REAL_TIME = 1,
44  SNAP_TO_TIMESTEPS = 2
45  };
46 
48 
51  vtkSetMacro(PlayMode, int);
52  vtkGetMacro(PlayMode, int);
54 
58  void SetNumberOfFrames(int val);
59 
63  void SetDuration(int val);
64 
66 
69  void AddTimeStep(double val);
70  void RemoveAllTimeSteps();
71  void SetFramesPerTimestep(int val);
73 
74 protected:
76  ~vtkCompositeAnimationPlayer() override;
77 
79 
82  void StartLoop(double starttime, double endtime, double curtime, double* playbackWindow) override;
83  void EndLoop() override;
84  double GetNextTime(double currentime) override;
86 
87  double GoToNext(double start, double end, double currenttime) override;
88  double GoToPrevious(double start, double end, double currenttime) override;
89 
90  vtkAnimationPlayer* GetActivePlayer();
91 
95 
96  int PlayMode;
97 
98 private:
100  void operator=(const vtkCompositeAnimationPlayer&) = delete;
101 
102  class vtkInternal;
103  vtkInternal* Internal;
104 };
105 
106 #endif
virtual double GetNextTime(double currentime)=0
Return the next time given the current time.
Abstract superclass for an animation player.
vtkRealtimeAnimationPlayer * RealtimeAnimationPlayer
virtual void StartLoop(double starttime, double endtime, double curtime, double *playbackWindow)=0
Animation player that plays in real time.
vtkTimestepsAnimationPlayer * TimestepsAnimationPlayer
This is composite animation player that can me made to play an animation using the active player...
void GoToPrevious()
Take animation scene to previous frame.
friend class vtkCompositeAnimationPlayer
virtual void EndLoop()=0
#define VTKREMOTINGANIMATION_EXPORT
void GoToNext()
Take the animation scene to next frame.
vtkAnimationPlayer subclass that plays through a discrete set of time values.
void PrintSelf(ostream &os, vtkIndent indent) override
static vtkObject * New()
vtkSequenceAnimationPlayer * SequenceAnimationPlayer