VTK
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 =========================================================================*/
43 #ifndef vtkAnimationCue_h
44 #define vtkAnimationCue_h
45 
46 #include "vtkCommonCoreModule.h" // For export macro
47 #include "vtkObject.h"
48 
50 {
51 public:
52  vtkTypeMacro(vtkAnimationCue,vtkObject);
53  void PrintSelf(ostream& os, vtkIndent indent);
54 
55  static vtkAnimationCue* New();
56 
57  //BTX
58  // Structure passed on every event invocation.
59  // Depending upon the cue time mode, these times are either
60  // normalized [0,1] or relative to the scene that contains the cue.
61  // All this information is also available by asking the cue
62  // directly for it within the handler. Thus, this information can
63  // be accessed in wrapped languages.
65  {
66  public:
67  double StartTime;
68  double EndTime;
69  double AnimationTime;// valid only in AnimationCueTickEvent handler
70  double DeltaTime; // valid only in AnimationCueTickEvent handler
71  double ClockTime; // valid only in AnimationCueTickEvent handler
72  };
73  //ETX
74 
76 
81  virtual void SetTimeMode(int mode);
82  vtkGetMacro(TimeMode, int);
84  { this->SetTimeMode(TIMEMODE_RELATIVE); }
86  { this->SetTimeMode(TIMEMODE_NORMALIZED); }
88 
90 
97  vtkSetMacro(StartTime, double);
98  vtkGetMacro(StartTime, double);
100 
102 
108  vtkSetMacro(EndTime, double);
109  vtkGetMacro(EndTime, double);
111 
125  virtual void Tick(double currenttime, double deltatime, double clocktime);
126 
129  virtual void Initialize();
130 
133  virtual void Finalize();
134 
136 
139  vtkGetMacro(AnimationTime, double);
141 
143 
146  vtkGetMacro(DeltaTime, double);
148 
150 
154  vtkGetMacro(ClockTime, double);
156 
157 //BTX
159  {
160  TIMEMODE_NORMALIZED=0,
161  TIMEMODE_RELATIVE=1
162  };
163 //ETX
164 protected:
165  vtkAnimationCue();
166  ~vtkAnimationCue();
167 //BTX
168  enum {
169  UNINITIALIZED=0,
171  ACTIVE
172  };
173 //ETX
174  double StartTime;
175  double EndTime;
176  int TimeMode;
177 
178  // These are set when the AnimationCueTickEvent event
179  // is fired. Thus giving access to the information in
180  // the AnimationCueInfo struct in wrapped languages.
182  double DeltaTime;
183  double ClockTime;
184 
186  int CueState;
187 
189 
192  virtual void StartCueInternal();
193  virtual void TickInternal(double currenttime, double deltatime,
194  double clocktime);
195  virtual void EndCueInternal();
197 
198 private:
199  vtkAnimationCue(const vtkAnimationCue&); // Not implemented.
200  void operator=(const vtkAnimationCue&); // Not implemented.
201 };
202 
203 #endif
204 
205 
206 
void SetTimeModeToNormalized()
abstract base class for most VTK objects
Definition: vtkObject.h:61
#define VTKCOMMONCORE_EXPORT
virtual void PrintSelf(ostream &os, vtkIndent indent)
a simple class to control print indentation
Definition: vtkIndent.h:38
a seqin an animation.
void SetTimeModeToRelative()
static vtkObject * New()