VTK  9.2.5
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 =========================================================================*/
62 #ifndef vtkAnimationScene_h
63 #define vtkAnimationScene_h
64 
65 #include "vtkAnimationCue.h"
66 #include "vtkCommonDataModelModule.h" // For export macro
67 
68 class vtkAnimationCue;
69 class vtkCollection;
71 class vtkTimerLog;
72 
73 class VTKCOMMONDATAMODEL_EXPORT vtkAnimationScene : public vtkAnimationCue
74 {
75 public:
77  void PrintSelf(ostream& os, vtkIndent indent) override;
79 
81 
88  vtkSetMacro(PlayMode, int);
89  void SetModeToSequence() { this->SetPlayMode(PLAYMODE_SEQUENCE); }
90  void SetModeToRealTime() { this->SetPlayMode(PLAYMODE_REALTIME); }
91  vtkGetMacro(PlayMode, int);
93 
95 
100  vtkSetMacro(FrameRate, double);
101  vtkGetMacro(FrameRate, double);
103 
105 
114 
119  virtual void Play();
120 
124  void Stop();
125 
127 
130  vtkSetMacro(Loop, int);
131  vtkGetMacro(Loop, int);
133 
137  void SetAnimationTime(double time);
138 
143  void SetTimeMode(int mode) override;
144 
148  int IsInPlay() { return this->InPlay; }
149 
151  {
152  PLAYMODE_SEQUENCE = 0,
153  PLAYMODE_REALTIME = 1
154  };
155 
156 protected:
158  ~vtkAnimationScene() override;
159 
161 
165  void TickInternal(double currenttime, double deltatime, double clocktime) override;
166  void StartCueInternal() override;
167  void EndCueInternal() override;
169 
172 
173  int PlayMode;
174  double FrameRate;
175  int Loop;
176  int InPlay;
177  int StopPlay;
178 
182 
183 private:
184  vtkAnimationScene(const vtkAnimationScene&) = delete;
185  void operator=(const vtkAnimationScene&) = delete;
186 };
187 
188 #endif
a seqin an animation.
the animation scene manager.
void SetModeToSequence()
Get/Set the PlayMode for running/playing the animation scene.
void SetAnimationTime(double time)
Makes the state of the scene same as the given time.
void TickInternal(double currenttime, double deltatime, double clocktime) override
Called on every valid tick.
int IsInPlay()
Returns if the animation is being played.
void RemoveCue(vtkAnimationCue *cue)
Add/Remove an AnimationCue to/from the Scene.
void StartCueInternal() override
Called on every valid tick.
void EndCueInternal() override
Called on every valid tick.
~vtkAnimationScene() override
void InitializeChildren()
int GetNumberOfCues()
Add/Remove an AnimationCue to/from the Scene.
static vtkAnimationScene * New()
void AddCue(vtkAnimationCue *cue)
Add/Remove an AnimationCue to/from the Scene.
void RemoveAllCues()
Add/Remove an AnimationCue to/from the Scene.
vtkTimerLog * AnimationTimer
void SetModeToRealTime()
Get/Set the PlayMode for running/playing the animation scene.
void SetTimeMode(int mode) override
Overridden to allow change to Normalized mode only if none of the constituent cues is in Relative tim...
void Stop()
Stops the animation scene that is running.
vtkCollection * AnimationCues
virtual void Play()
Starts playing the animation scene.
vtkCollectionIterator * AnimationCuesIterator
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
iterator through a vtkCollection.
create and manipulate ordered lists of objects
Definition: vtkCollection.h:56
a simple class to control print indentation
Definition: vtkIndent.h:119
Timer support and logging.
Definition: vtkTimerLog.h:205
@ mode
Definition: vtkX3D.h:253
@ time
Definition: vtkX3D.h:503