ParaView
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 "vtkPVAnimationModule.h" // needed for export macro
28 
32 
33 class VTKPVANIMATION_EXPORT vtkCompositeAnimationPlayer : public vtkAnimationPlayer
34 {
35 public:
36  static vtkCompositeAnimationPlayer* New();
38  void PrintSelf(ostream& os, vtkIndent indent);
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:
77 
79 
82  virtual void StartLoop(double starttime, double endtime, double* playbackWindow);
83  virtual void EndLoop();
84  virtual double GetNextTime(double currentime);
86 
87  virtual double GoToNext(double start, double end, double currenttime);
88  virtual double GoToPrevious(double start, double end, double currenttime);
89 
90  vtkAnimationPlayer* GetActivePlayer();
91 
95 
96  int PlayMode;
97 
98 private:
99  vtkCompositeAnimationPlayer(const vtkCompositeAnimationPlayer&) VTK_DELETE_FUNCTION;
100  void operator=(const vtkCompositeAnimationPlayer&) VTK_DELETE_FUNCTION;
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
Animation player that plays in real time.
virtual void StartLoop(double starttime, double endtime, double *playbackWindow)=0
vtkTimestepsAnimationPlayer * TimestepsAnimationPlayer
This is composite animation player that can me made to play an animation using the active player...
void PrintSelf(ostream &os, vtkIndent indent)
void GoToPrevious()
Take animation scene to previous frame.
friend class vtkCompositeAnimationPlayer
virtual void EndLoop()=0
void GoToNext()
Take the animation scene to next frame.
vtkAnimationPlayer subclass that plays through a discrete set of time values.
vtkSequenceAnimationPlayer * SequenceAnimationPlayer