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 "vtkObject.h"
47 
49 {
50 public:
51  vtkTypeMacro(vtkAnimationCue,vtkObject);
52  void PrintSelf(ostream& os, vtkIndent indent);
53 
54  static vtkAnimationCue* New();
55 
56  //BTX
57  // Structure passed on every event invocation.
58  // Depending upon the cue time mode, these times are either
59  // normalized [0,1] or relative to the scene that contains the cue.
60  // All this information is also available by asking the cue
61  // directly for it within the handler. Thus, this information can
62  // be accessed in wrapped languages.
64  {
65  public:
66  double StartTime;
67  double EndTime;
68  double AnimationTime;// valid only in AnimationCueTickEvent handler
69  double DeltaTime; // valid only in AnimationCueTickEvent handler
70  double ClockTime; // valid only in AnimationCueTickEvent handler
71  };
72  //ETX
73 
75 
80  virtual void SetTimeMode(int mode);
81  vtkGetMacro(TimeMode, int);
83  { this->SetTimeMode(TIMEMODE_RELATIVE); }
85  { this->SetTimeMode(TIMEMODE_NORMALIZED); }
87 
89 
96  vtkSetMacro(StartTime, double);
97  vtkGetMacro(StartTime, double);
99 
101 
107  vtkSetMacro(EndTime, double);
108  vtkGetMacro(EndTime, double);
110 
124  virtual void Tick(double currenttime, double deltatime, double clocktime);
125 
128  virtual void Initialize();
129 
132  virtual void Finalize();
133 
135 
138  vtkGetMacro(AnimationTime, double);
140 
142 
145  vtkGetMacro(DeltaTime, double);
147 
149 
153  vtkGetMacro(ClockTime, double);
155 
156 //BTX
158  {
159  TIMEMODE_NORMALIZED=0,
160  TIMEMODE_RELATIVE=1
161  };
162 //ETX
163 protected:
164  vtkAnimationCue();
165  ~vtkAnimationCue();
166 //BTX
167  enum {
168  UNINITIALIZED=0,
170  ACTIVE
171  };
172 //ETX
173  double StartTime;
174  double EndTime;
175  int TimeMode;
176 
177  // These are set when the AnimationCueTickEvent event
178  // is fired. Thus giving access to the information in
179  // the AnimationCueInfo struct in wrapped languages.
181  double DeltaTime;
182  double ClockTime;
183 
185  int CueState;
186 
188 
191  virtual void StartCueInternal();
192  virtual void TickInternal(double currenttime, double deltatime,
193  double clocktime);
194  virtual void EndCueInternal();
196 
197 private:
198  vtkAnimationCue(const vtkAnimationCue&); // Not implemented.
199  void operator=(const vtkAnimationCue&); // Not implemented.
200 };
201 
202 #endif
203 
204 
205 
void SetTimeModeToNormalized()
abstract base class for most VTK objects
Definition: vtkObject.h:60
virtual void PrintSelf(ostream &os, vtkIndent indent)
a simple class to control print indentation
Definition: vtkIndent.h:37
a seqin an animation.
#define VTK_COMMON_EXPORT
void SetTimeModeToRelative()
static vtkObject * New()