VTK
vtkAnimationScene.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkAnimationScene.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm 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 =========================================================================*/
30 #ifndef vtkAnimationScene_h
31 #define vtkAnimationScene_h
32 
33 #include "vtkCommonDataModelModule.h" // For export macro
34 #include "vtkAnimationCue.h"
35 
36 class vtkAnimationCue;
37 class vtkCollection;
39 class vtkTimerLog;
40 
41 class VTKCOMMONDATAMODEL_EXPORT vtkAnimationScene: public vtkAnimationCue
42 {
43 public:
45  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
46  static vtkAnimationScene* New();
47 
49 
56  vtkSetMacro(PlayMode, int);
57  void SetModeToSequence() { this->SetPlayMode(PLAYMODE_SEQUENCE); }
58  void SetModeToRealTime() { this->SetPlayMode(PLAYMODE_REALTIME); }
59  vtkGetMacro(PlayMode, int);
61 
63 
68  vtkSetMacro(FrameRate, double);
69  vtkGetMacro(FrameRate, double);
71 
73 
77  void AddCue(vtkAnimationCue* cue);
78  void RemoveCue(vtkAnimationCue* cue);
79  void RemoveAllCues();
80  int GetNumberOfCues();
82 
87  virtual void Play();
88 
92  void Stop();
93 
95 
98  vtkSetMacro(Loop, int);
99  vtkGetMacro(Loop, int);
101 
105  void SetAnimationTime(double time);
106 
111  void SetTimeMode(int mode) VTK_OVERRIDE;
112 
116  int IsInPlay() { return this->InPlay; }
117 
119  {
120  PLAYMODE_SEQUENCE=0,
121  PLAYMODE_REALTIME=1
122  };
123 
124 protected:
126  ~vtkAnimationScene() VTK_OVERRIDE;
127 
129 
133  void TickInternal(double currenttime, double deltatime, double clocktime) VTK_OVERRIDE;
134  void StartCueInternal() VTK_OVERRIDE;
135  void EndCueInternal() VTK_OVERRIDE;
137 
138  void InitializeChildren();
139  void FinalizeChildren();
140 
141  int PlayMode;
142  double FrameRate;
143  int Loop;
144  int InPlay;
145  int StopPlay;
146  double AnimationTime;
147 
148  vtkCollection* AnimationCues;
149  vtkCollectionIterator* AnimationCuesIterator;
150  vtkTimerLog* AnimationTimer;
151 
152 private:
153  vtkAnimationScene(const vtkAnimationScene&) VTK_DELETE_FUNCTION;
154  void operator=(const vtkAnimationScene&) VTK_DELETE_FUNCTION;
155 };
156 
157 #endif
static vtkAnimationCue * New()
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void SetModeToSequence()
Get/Set the PlayMode for running/playing the animation scene.
Timer support and logging.
Definition: vtkTimerLog.h:85
a simple class to control print indentation
Definition: vtkIndent.h:33
int IsInPlay()
Returns if the animation is being played.
a seqin an animation.
virtual void SetTimeMode(int mode)
Get/Set the time mode.
void SetModeToRealTime()
Get/Set the PlayMode for running/playing the animation scene.
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
iterator through a vtkCollection.
the animation scene manager.
create and manipulate ordered lists of objects
Definition: vtkCollection.h:48