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=========================================================================*/
30#ifndef vtkAnimationScene_h
31#define vtkAnimationScene_h
32
33#include "vtkAnimationCue.h"
34#include "vtkCommonDataModelModule.h" // For export macro
35
36class vtkAnimationCue;
37class vtkCollection;
39class vtkTimerLog;
40
41class VTKCOMMONDATAMODEL_EXPORT vtkAnimationScene : public vtkAnimationCue
42{
43public:
45 void PrintSelf(ostream& os, vtkIndent indent) override;
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
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) override;
112
116 int IsInPlay() { return this->InPlay; }
117
119 {
120 PLAYMODE_SEQUENCE = 0,
121 PLAYMODE_REALTIME = 1
122 };
123
124protected:
127
129
133 void TickInternal(double currenttime, double deltatime, double clocktime) override;
134 void StartCueInternal() override;
135 void EndCueInternal() override;
137
140
142 double FrameRate;
143 int Loop;
146
150
151private:
152 vtkAnimationScene(const vtkAnimationScene&) = delete;
153 void operator=(const vtkAnimationScene&) = delete;
154};
155
156#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.
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...
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:34
Timer support and logging.
Definition vtkTimerLog.h:90