VTK  9.6.20260227
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
49
50#ifndef vtkAnimationScene_h
51#define vtkAnimationScene_h
52
53#include "vtkAnimationCue.h"
54#include "vtkCommonDataModelModule.h" // For export macro
55
56VTK_ABI_NAMESPACE_BEGIN
57class vtkAnimationCue;
58class vtkCollection;
59class vtkTimerLog;
60
61class VTKCOMMONDATAMODEL_EXPORT vtkAnimationScene : public vtkAnimationCue
62{
63public:
65 void PrintSelf(ostream& os, vtkIndent indent) override;
67
69
76 vtkSetMacro(PlayMode, int);
79 vtkGetMacro(PlayMode, int);
81
83
88 vtkSetMacro(FrameRate, double);
89 vtkGetMacro(FrameRate, double);
91
93
102
107 virtual void Play();
108
112 void Stop();
113
115
118 vtkSetMacro(Loop, int);
119 vtkGetMacro(Loop, int);
121
125 void SetAnimationTime(double time);
126
131 void SetTimeMode(int mode) override;
132
136 int IsInPlay() { return this->InPlay; }
137
143
144protected:
147
149
153 void TickInternal(double currenttime, double deltatime, double clocktime) override;
154 void StartCueInternal() override;
155 void EndCueInternal() override;
157
160
162 double FrameRate;
163 int Loop;
166
169
170private:
171 vtkAnimationScene(const vtkAnimationScene&) = delete;
172 void operator=(const vtkAnimationScene&) = delete;
173};
174
175VTK_ABI_NAMESPACE_END
176#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:108
Timer support and logging.