• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

dox/Common/vtkAnimationCue.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkAnimationCue.h,v $
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00040 #ifndef __vtkAnimationCue_h
00041 #define __vtkAnimationCue_h
00042 
00043 #include "vtkObject.h"
00044 
00045 class VTK_COMMON_EXPORT vtkAnimationCue: public vtkObject
00046 {
00047 public:
00048   vtkTypeRevisionMacro(vtkAnimationCue,vtkObject);
00049   void PrintSelf(ostream& os, vtkIndent indent);
00050 
00051   static vtkAnimationCue* New();
00052 
00053   //BTX
00054   // Structure passed on every event invocation.
00055   // Depending upon the cue time mode, these times are either
00056   // normalized [0,1] or relative to the scene that contains the cue.
00057   // All this information is also available by asking the cue
00058   // directly for it within the handler. Thus, this information can 
00059   // be accessed in wrapped languages.
00060   class AnimationCueInfo
00061     {
00062   public:
00063     double StartTime;
00064     double EndTime;
00065     double AnimationTime;// valid only in AnimationCueTickEvent handler
00066     double DeltaTime;   // valid only in AnimationCueTickEvent handler
00067     double ClockTime;   // valid only in AnimationCueTickEvent handler
00068     };
00069   //ETX
00070   
00072 
00077   virtual void SetTimeMode(int mode);
00078   vtkGetMacro(TimeMode, int);
00079   void SetTimeModeToRelative() 
00080     { this->SetTimeMode(TIMEMODE_RELATIVE); }
00081   void SetTimeModeToNormalized() 
00082     { this->SetTimeMode(TIMEMODE_NORMALIZED); }
00084 
00086 
00093   vtkSetMacro(StartTime, double);
00094   vtkGetMacro(StartTime, double);
00096 
00098 
00104   vtkSetMacro(EndTime, double);
00105   vtkGetMacro(EndTime, double);
00107  
00121   virtual void Tick(double currenttime, double deltatime, double clocktime);
00122 
00125   virtual void Initialize();
00126 
00129   virtual void Finalize();
00130 
00132 
00135   vtkGetMacro(AnimationTime, double);
00137 
00139 
00142   vtkGetMacro(DeltaTime, double);
00144 
00146 
00150   vtkGetMacro(ClockTime, double);
00152 
00153 //BTX
00154   enum TimeCodes
00155   {
00156     TIMEMODE_NORMALIZED=0,
00157     TIMEMODE_RELATIVE=1
00158   };
00159 //ETX
00160 protected:
00161   vtkAnimationCue();
00162   ~vtkAnimationCue();
00163 //BTX
00164   enum {
00165     UNINITIALIZED=0,
00166     INACTIVE,
00167     ACTIVE
00168   };
00169 //ETX
00170   double StartTime;
00171   double EndTime;
00172   int TimeMode;
00173 
00174   // These are set when the AnimationCueTickEvent event 
00175   // is fired. Thus giving access to the information in
00176   // the AnimationCueInfo struct in wrapped languages.
00177   double AnimationTime;
00178   double DeltaTime;
00179   double ClockTime;
00180   
00182   int CueState;
00183 
00185 
00188   virtual void StartCueInternal();
00189   virtual void TickInternal(double currenttime, double deltatime,
00190     double clocktime);
00191   virtual void EndCueInternal();
00193  
00194 private:
00195   vtkAnimationCue(const vtkAnimationCue&);  // Not implemented.
00196   void operator=(const vtkAnimationCue&);  // Not implemented.
00197 };
00198 
00199 #endif
00200 
00201 
00202 

Generated by  doxygen 1.7.1