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 =========================================================================*/
32 #ifndef vtkAnimationScene_h
33 #define vtkAnimationScene_h
34 
35 #include "vtkCommonDataModelModule.h" // For export macro
36 #include "vtkAnimationCue.h"
37 
38 class vtkAnimationCue;
39 class vtkCollection;
41 class vtkTimerLog;
42 
44 {
45 public:
47  void PrintSelf(ostream& os, vtkIndent indent);
48  static vtkAnimationScene* New();
49 
51 
56  vtkSetMacro(PlayMode, int);
57  void SetModeToSequence() { this->SetPlayMode(PLAYMODE_SEQUENCE); }
58  void SetModeToRealTime() { this->SetPlayMode(PLAYMODE_REALTIME); }
59  vtkGetMacro(PlayMode, int);
61 
63 
66  vtkSetMacro(FrameRate, double);
67  vtkGetMacro(FrameRate, double);
69 
71 
73  void AddCue(vtkAnimationCue* cue);
74  void RemoveCue(vtkAnimationCue* cue);
75  void RemoveAllCues();
76  int GetNumberOfCues();
78 
81  virtual void Play();
82 
84  void Stop();
85 
87 
88  vtkSetMacro(Loop, int);
89  vtkGetMacro(Loop, int);
91 
93 
94  void SetAnimationTime(double time);
95  vtkGetMacro(AnimationTime, double);
97 
100  virtual void SetTimeMode(int mode);
101 
103  int IsInPlay() { return this->InPlay; }
104 
105 //BTX
107  {
108  PLAYMODE_SEQUENCE=0,
109  PLAYMODE_REALTIME=1
110  };
111 //ETX
112 
113 protected:
116 
118 
119  virtual void TickInternal(double currenttime, double deltatime, double clocktime);
120  virtual void StartCueInternal();
121  virtual void EndCueInternal();
123 
124  void InitializeChildren();
125  void FinalizeChildren();
126 
127  int PlayMode;
128  double FrameRate;
129  int Loop;
130  int InPlay;
131  int StopPlay;
133 
137 
138 private:
139  vtkAnimationScene(const vtkAnimationScene&); // Not implemented.
140  void operator=(const vtkAnimationScene&); // Not implemented.
141 };
142 
143 #endif
virtual void EndCueInternal()
static vtkAnimationCue * New()
Timer support and logging.
Definition: vtkTimerLog.h:81
vtkTimerLog * AnimationTimer
virtual void TickInternal(double currenttime, double deltatime, double clocktime)
virtual void StartCueInternal()
a simple class to control print indentation
Definition: vtkIndent.h:38
vtkCollection * AnimationCues
a seqin an animation.
virtual void SetTimeMode(int mode)
iterator through a vtkCollection.
the animation scene manager.
create and manipulate unsorted lists of objects
Definition: vtkCollection.h:52
vtkCollectionIterator * AnimationCuesIterator
void PrintSelf(ostream &os, vtkIndent indent)
#define VTKCOMMONDATAMODEL_EXPORT