VTK  9.7.0
vtkAnimationScene.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
20
21#ifndef vtkAnimationScene_h
22#define vtkAnimationScene_h
23
24#include "vtkAnimationCue.h"
25#include "vtkCommonDataModelModule.h" // For export macro
26
27VTK_ABI_NAMESPACE_BEGIN
28class vtkAnimationCue;
29class vtkCollection;
30class vtkTimerLog;
31
32class VTKCOMMONDATAMODEL_EXPORT vtkAnimationScene : public vtkAnimationCue
33{
34public:
36 void PrintSelf(ostream& os, vtkIndent indent) override;
38
40
47 vtkSetMacro(PlayMode, int);
50 vtkGetMacro(PlayMode, int);
52
54
59 vtkSetMacro(FrameRate, double);
60 vtkGetMacro(FrameRate, double);
62
64
73
78 virtual void Play();
79
83 void Stop();
84
86
89 vtkSetMacro(Loop, int);
90 vtkGetMacro(Loop, int);
92
96 void SetAnimationTime(double time);
97
102 void SetTimeMode(int mode) override;
103
107 int IsInPlay() { return this->InPlay; }
108
110 {
113 };
114
115protected:
118
120
124 void TickInternal(double currenttime, double deltatime, double clocktime) override;
125 void StartCueInternal() override;
126 void EndCueInternal() override;
128
131
133 double FrameRate;
134 int Loop;
137
140
141private:
142 vtkAnimationScene(const vtkAnimationScene&) = delete;
143 void operator=(const vtkAnimationScene&) = delete;
144};
145
146VTK_ABI_NAMESPACE_END
147#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.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
create and manipulate ordered lists of objects
a simple class to control print indentation
Definition vtkIndent.h:29
Timer support and logging.
Definition vtkTimerLog.h:86