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

dox/Common/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);
00071   void RemoveAllCues();
00072   int  GetNumberOfCues();
00074   
00077   virtual void Play();
00078 
00080   void Stop();
00081 
00083 
00084   vtkSetMacro(Loop, int);
00085   vtkGetMacro(Loop, int);
00087 
00089 
00090   void SetAnimationTime(double time);
00091   vtkGetMacro(AnimationTime, double);
00093 
00096   virtual void SetTimeMode(int mode);
00097 
00099   int IsInPlay() { return this->InPlay; } 
00100 
00101 //BTX
00102   enum PlayModes
00103   {
00104     PLAYMODE_SEQUENCE=0,
00105     PLAYMODE_REALTIME=1
00106   };
00107 //ETX
00108 
00109 protected:
00110   vtkAnimationScene();
00111   ~vtkAnimationScene();
00112 
00114 
00115   virtual void TickInternal(double currenttime, double deltatime, double clocktime);
00116   virtual void StartCueInternal();
00117   virtual void EndCueInternal();
00119 
00120   void InitializeChildren();
00121   void FinalizeChildren();
00122   
00123   int PlayMode;
00124   double FrameRate;
00125   int Loop;
00126   int InPlay;
00127   int StopPlay;
00128   double AnimationTime;
00129 
00130   vtkCollection* AnimationCues;
00131   vtkCollectionIterator* AnimationCuesIterator;
00132   vtkTimerLog* AnimationTimer;
00133   
00134 private:
00135   vtkAnimationScene(const vtkAnimationScene&); // Not implemented.
00136   void operator=(const vtkAnimationScene&); // Not implemented.
00137 };
00138 
00139 #endif

Generated by  doxygen 1.7.1