VTK  9.2.6
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
33#ifndef vtkAnimationScene_h
34#define vtkAnimationScene_h
35
36#include "vtkAnimationCue.h"
37#include "vtkCommonDataModelModule.h" // For export macro
38
39class vtkAnimationCue;
40class vtkCollection;
42class vtkTimerLog;
43
44class VTKCOMMONDATAMODEL_EXPORT vtkAnimationScene : public vtkAnimationCue
45{
46public:
48 void PrintSelf(ostream& os, vtkIndent indent) override;
50
52
59 vtkSetMacro(PlayMode, int);
62 vtkGetMacro(PlayMode, int);
64
66
71 vtkSetMacro(FrameRate, double);
72 vtkGetMacro(FrameRate, double);
74
76
85
90 virtual void Play();
91
95 void Stop();
96
98
101 vtkSetMacro(Loop, int);
102 vtkGetMacro(Loop, int);
104
108 void SetAnimationTime(double time);
109
114 void SetTimeMode(int mode) override;
115
119 int IsInPlay() { return this->InPlay; }
120
126
127protected:
130
132
136 void TickInternal(double currenttime, double deltatime, double clocktime) override;
137 void StartCueInternal() override;
138 void EndCueInternal() override;
140
143
145 double FrameRate;
146 int Loop;
149
153
154private:
155 vtkAnimationScene(const vtkAnimationScene&) = delete;
156 void operator=(const vtkAnimationScene&) = delete;
157};
158
159#endif
a seqin an animation.
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.
void AddCue(vtkAnimationCue *cue)
Add/Remove an AnimationCue to/from the Scene.
void RemoveAllCues()
Add/Remove an AnimationCue to/from the Scene.
static vtkAnimationScene * New()
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...
virtual void SetPlayMode(int)
Get/Set the PlayMode for running/playing the animation scene.
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
a simple class to control print indentation
Definition vtkIndent.h:40
Timer support and logging.
Definition vtkTimerLog.h:96