00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00043 #ifndef __vtkAnimationCue_h
00044 #define __vtkAnimationCue_h
00045
00046 #include "vtkObject.h"
00047
00048 class VTK_COMMON_EXPORT vtkAnimationCue: public vtkObject
00049 {
00050 public:
00051 vtkTypeMacro(vtkAnimationCue,vtkObject);
00052 void PrintSelf(ostream& os, vtkIndent indent);
00053
00054 static vtkAnimationCue* New();
00055
00056
00057
00058
00059
00060
00061
00062
00063 class AnimationCueInfo
00064 {
00065 public:
00066 double StartTime;
00067 double EndTime;
00068 double AnimationTime;
00069 double DeltaTime;
00070 double ClockTime;
00071 };
00072
00073
00075
00080 virtual void SetTimeMode(int mode);
00081 vtkGetMacro(TimeMode, int);
00082 void SetTimeModeToRelative()
00083 { this->SetTimeMode(TIMEMODE_RELATIVE); }
00084 void SetTimeModeToNormalized()
00085 { this->SetTimeMode(TIMEMODE_NORMALIZED); }
00087
00089
00096 vtkSetMacro(StartTime, double);
00097 vtkGetMacro(StartTime, double);
00099
00101
00107 vtkSetMacro(EndTime, double);
00108 vtkGetMacro(EndTime, double);
00110
00124 virtual void Tick(double currenttime, double deltatime, double clocktime);
00125
00128 virtual void Initialize();
00129
00132 virtual void Finalize();
00133
00135
00138 vtkGetMacro(AnimationTime, double);
00140
00142
00145 vtkGetMacro(DeltaTime, double);
00147
00149
00153 vtkGetMacro(ClockTime, double);
00155
00156
00157 enum TimeCodes
00158 {
00159 TIMEMODE_NORMALIZED=0,
00160 TIMEMODE_RELATIVE=1
00161 };
00162
00163 protected:
00164 vtkAnimationCue();
00165 ~vtkAnimationCue();
00166
00167 enum {
00168 UNINITIALIZED=0,
00169 INACTIVE,
00170 ACTIVE
00171 };
00172
00173 double StartTime;
00174 double EndTime;
00175 int TimeMode;
00176
00177
00178
00179
00180 double AnimationTime;
00181 double DeltaTime;
00182 double ClockTime;
00183
00185 int CueState;
00186
00188
00191 virtual void StartCueInternal();
00192 virtual void TickInternal(double currenttime, double deltatime,
00193 double clocktime);
00194 virtual void EndCueInternal();
00196
00197 private:
00198 vtkAnimationCue(const vtkAnimationCue&);
00199 void operator=(const vtkAnimationCue&);
00200 };
00201
00202 #endif
00203
00204
00205