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

vtkAnimationScene.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkAnimationScene.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 =========================================================================*/
00029 #ifndef __vtkAnimationScene_h
00030 #define __vtkAnimationScene_h
00031 
00032 #include "vtkAnimationCue.h"
00033 
00034 class vtkAnimationCue;
00035 class vtkCollection;
00036 class vtkCollectionIterator;
00037 class vtkTimerLog;
00038 
00039 class VTK_COMMON_EXPORT vtkAnimationScene: public vtkAnimationCue
00040 {
00041 public:
00042   vtkTypeRevisionMacro(vtkAnimationScene, vtkAnimationCue);
00043   void PrintSelf(ostream& os, vtkIndent indent);
00044   static vtkAnimationScene* New();
00045 
00047 
00052   vtkSetMacro(PlayMode, int);
00053   void SetModeToSequence() { this->SetPlayMode(PLAYMODE_SEQUENCE); }
00054   void SetModeToRealTime() { this->SetPlayMode(PLAYMODE_REALTIME); }
00055   vtkGetMacro(PlayMode, int);
00057 
00059 
00062   vtkSetMacro(FrameRate, double);
00063   vtkGetMacro(FrameRate, double);
00065   
00067 
00069   void AddCue(vtkAnimationCue* cue);
00070   void RemoveCue(vtkAnimationCue* cue);
00072   
00074   void Play();
00075 
00077   void Stop();
00078 
00080 
00081   vtkSetMacro(Loop, int);
00082   vtkGetMacro(Loop, int);
00084 
00086   void SetAnimationTime(double time);
00087 
00090   virtual void SetTimeMode(int mode);
00091 
00093   int IsInPlay() { return this->InPlay; } 
00094 
00095 //BTX
00096   enum PlayModes
00097   {
00098     PLAYMODE_SEQUENCE=0,
00099     PLAYMODE_REALTIME=1
00100   };
00101 //ETX
00102 
00103 protected:
00104   vtkAnimationScene();
00105   ~vtkAnimationScene();
00106 
00108 
00109   virtual void TickInternal(double currenttime, double deltatime);
00110   virtual void StartCueInternal();
00111   virtual void EndCueInternal();
00113 
00114   void InitializeChildren();
00115   void FinalizeChildren();
00116   
00117   int PlayMode;
00118   double FrameRate;
00119   int Loop;
00120   int InPlay;
00121   int StopPlay;
00122   double AnimationTime;
00123 
00124   vtkCollection* AnimationCues;
00125   vtkCollectionIterator* AnimationCuesIterator;
00126   vtkTimerLog* AnimationTimer;
00127   
00128 private:
00129   vtkAnimationScene(const vtkAnimationScene&); // Not implemented.
00130   void operator=(const vtkAnimationScene&); // Not implemented.
00131 };
00132 
00133 #endif
00134 

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