VTK  9.2.6
vtkAnimationCue.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkAnimationCue.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=========================================================================*/
40
41#ifndef vtkAnimationCue_h
42#define vtkAnimationCue_h
43
44#include "vtkCommonCoreModule.h" // For export macro
45#include "vtkObject.h"
46
47class VTKCOMMONCORE_EXPORT vtkAnimationCue : public vtkObject
48{
49public:
50 vtkTypeMacro(vtkAnimationCue, vtkObject);
51 void PrintSelf(ostream& os, vtkIndent indent) override;
52
54
55 // Structure passed on every event invocation.
56 // Depending upon the cue time mode, these times are either
57 // normalized [0,1] or relative to the scene that contains the cue.
58 // All this information is also available by asking the cue
59 // directly for it within the handler. Thus, this information can
60 // be accessed in wrapped languages.
62 {
63 public:
64 double StartTime;
65 double EndTime;
66 double AnimationTime; // valid only in AnimationCueTickEvent handler
67 double DeltaTime; // valid only in AnimationCueTickEvent handler
68 double ClockTime; // valid only in AnimationCueTickEvent handler
69 };
70
72
79 virtual void SetTimeMode(int mode);
80 vtkGetMacro(TimeMode, int);
84
86
96 vtkSetMacro(StartTime, double);
97 vtkGetMacro(StartTime, double);
99
101
110 vtkSetMacro(EndTime, double);
111 vtkGetMacro(EndTime, double);
113
132 virtual void Tick(double currenttime, double deltatime, double clocktime);
133
138 virtual void Initialize();
139
145 virtual void Finalize();
146
148
153 vtkGetMacro(AnimationTime, double);
155
157
162 vtkGetMacro(DeltaTime, double);
164
166
172 vtkGetMacro(ClockTime, double);
174
180
181 enum class PlayDirection
182 {
185 };
186
188
194
195protected:
198
199 enum
200 {
204 };
205
206 double StartTime;
207 double EndTime;
210
211 // These are set when the AnimationCueTickEvent event
212 // is fired. Thus giving access to the information in
213 // the AnimationCueInfo struct in wrapped languages.
215 double DeltaTime;
216 double ClockTime;
217
222
224
229 virtual void StartCueInternal();
230 virtual void TickInternal(double currenttime, double deltatime, double clocktime);
231 virtual void EndCueInternal();
233
235
239 virtual bool CheckStartCue(double currenttime);
240 virtual bool CheckEndCue(double currenttime);
242
243private:
244 vtkAnimationCue(const vtkAnimationCue&) = delete;
245 void operator=(const vtkAnimationCue&) = delete;
246};
247
248#endif
PlayDirection Direction
~vtkAnimationCue() override
void SetTimeModeToRelative()
Get/Set the time mode.
void SetTimeModeToNormalized()
Get/Set the time mode.
virtual void StartCueInternal()
These are the internal methods that actually trigger they corresponding events.
virtual void EndCueInternal()
These are the internal methods that actually trigger they corresponding events.
virtual bool CheckEndCue(double currenttime)
These test the start, end time variables with current time to decide whether the animation can begin ...
virtual void Initialize()
Called when the playing of the scene begins.
virtual void Finalize()
Called when the scene reaches the end.
vtkSetEnumMacro(Direction, PlayDirection)
Set/get the direction of playback.
virtual bool CheckStartCue(double currenttime)
These test the start, end time variables with current time to decide whether the animation can begin ...
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
int CueState
Current state of the Cue.
static vtkAnimationCue * New()
virtual void TickInternal(double currenttime, double deltatime, double clocktime)
These are the internal methods that actually trigger they corresponding events.
virtual void SetTimeMode(int mode)
Get/Set the time mode.
virtual void Tick(double currenttime, double deltatime, double clocktime)
Indicates a tick or point in time in the animation.
vtkGetEnumMacro(Direction, PlayDirection)
Set/get the direction of playback.
a simple class to control print indentation
Definition vtkIndent.h:34