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 "vtkAnimationCue.h"
36 
37 class vtkAnimationCue;
38 class vtkCollection;
40 class vtkTimerLog;
41 
43 {
44 public:
46  void PrintSelf(ostream& os, vtkIndent indent);
47  static vtkAnimationScene* New();
48 
50 
55  vtkSetMacro(PlayMode, int);
56  void SetModeToSequence() { this->SetPlayMode(PLAYMODE_SEQUENCE); }
57  void SetModeToRealTime() { this->SetPlayMode(PLAYMODE_REALTIME); }
58  vtkGetMacro(PlayMode, int);
60 
62 
65  vtkSetMacro(FrameRate, double);
66  vtkGetMacro(FrameRate, double);
68 
70 
72  void AddCue(vtkAnimationCue* cue);
73  void RemoveCue(vtkAnimationCue* cue);
74  void RemoveAllCues();
75  int GetNumberOfCues();
77 
80  virtual void Play();
81 
83  void Stop();
84 
86 
87  vtkSetMacro(Loop, int);
88  vtkGetMacro(Loop, int);
90 
92 
93  void SetAnimationTime(double time);
94  vtkGetMacro(AnimationTime, double);
96 
99  virtual void SetTimeMode(int mode);
100 
102  int IsInPlay() { return this->InPlay; }
103 
104 //BTX
106  {
107  PLAYMODE_SEQUENCE=0,
108  PLAYMODE_REALTIME=1
109  };
110 //ETX
111 
112 protected:
115 
117 
118  virtual void TickInternal(double currenttime, double deltatime, double clocktime);
119  virtual void StartCueInternal();
120  virtual void EndCueInternal();
122 
123  void InitializeChildren();
124  void FinalizeChildren();
125 
126  int PlayMode;
127  double FrameRate;
128  int Loop;
129  int InPlay;
130  int StopPlay;
132 
136 
137 private:
138  vtkAnimationScene(const vtkAnimationScene&); // Not implemented.
139  void operator=(const vtkAnimationScene&); // Not implemented.
140 };
141 
142 #endif
virtual void EndCueInternal()
static vtkAnimationCue * New()
Timer support and logging.
Definition: vtkTimerLog.h:82
vtkTimerLog * AnimationTimer
virtual void TickInternal(double currenttime, double deltatime, double clocktime)
virtual void StartCueInternal()
a simple class to control print indentation
Definition: vtkIndent.h:37
vtkCollection * AnimationCues
a seqin an animation.
virtual void SetTimeMode(int mode)
#define VTK_COMMON_EXPORT
iterator through a vtkCollection.
the animation scene manager.
create and manipulate unsorted lists of objects
Definition: vtkCollection.h:51
vtkCollectionIterator * AnimationCuesIterator
void PrintSelf(ostream &os, vtkIndent indent)