Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

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   class AnimationCueInfo
00058     {
00059   public:
00060     double StartTime;
00061     double EndTime;
00062     double AnimationTime;// valid only on AnimationCueTickEvent
00063     double DeltaTime;   // valid only on AnimationCueTickEvent
00064     };
00065   //ETX
00066   
00068 
00073   virtual void SetTimeMode(int mode);
00074   vtkGetMacro(TimeMode, int);
00075   void SetTimeModeToRelative() 
00076     { this->SetTimeMode(TIMEMODE_RELATIVE); }
00077   void SetTimeModeToNormalized() 
00078     { this->SetTimeMode(TIMEMODE_NORMALIZED); }
00080 
00082 
00089   vtkSetMacro(StartTime, double);
00090   vtkGetMacro(StartTime, double);
00092 
00094 
00100   vtkSetMacro(EndTime, double);
00101   vtkGetMacro(EndTime, double);
00103  
00115   virtual void Tick(double currenttime, double deltatime);
00116 
00119   virtual void Initialize();
00120 
00123   virtual void Finalize();
00124 
00125 //BTX
00126   enum TimeCodes
00127   {
00128     TIMEMODE_NORMALIZED=0,
00129     TIMEMODE_RELATIVE=1
00130   };
00131 //ETX
00132 protected:
00133   vtkAnimationCue();
00134   ~vtkAnimationCue();
00135 //BTX
00136   enum {
00137     UNINITIALIZED=0,
00138     INACTIVE,
00139     ACTIVE
00140   };
00141 //ETX
00142   double StartTime;
00143   double EndTime;
00144   int TimeMode;
00145   
00147   int CueState;
00148 
00150 
00153   virtual void StartCueInternal();
00154   virtual void TickInternal(double currenttime, double deltatime);
00155   virtual void EndCueInternal();
00157  
00158 private:
00159   vtkAnimationCue(const vtkAnimationCue&);  // Not implemented.
00160   void operator=(const vtkAnimationCue&);  // Not implemented.
00161 };
00162 
00163 #endif
00164 
00165 
00166 

Generated on Mon Jan 21 23:07:16 2008 for VTK by  doxygen 1.4.3-20050530