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

Servers/ServerManager/vtkSMAnimationSceneProxy.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   ParaView
00004   Module:    $RCSfile: vtkSMAnimationSceneProxy.h,v $
00005 
00006   Copyright (c) Kitware, Inc.
00007   All rights reserved.
00008   See Copyright.txt or http://www.paraview.org/HTML/Copyright.html 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 =========================================================================*/
00025 #ifndef __vtkSMAnimationSceneProxy_h
00026 #define __vtkSMAnimationSceneProxy_h
00027 
00028 #include "vtkSMAnimationCueProxy.h"
00029 
00030 class vtkAnimationScene;
00031 class vtkCollection;
00032 class vtkCollectionIterator;
00033 class vtkSMRenderModuleProxy;
00034 class vtkImageWriter;
00035 class vtkGenericMovieWriter;
00036 
00037 class VTK_EXPORT vtkSMAnimationSceneProxy : public vtkSMAnimationCueProxy
00038 {
00039 public:
00040   static vtkSMAnimationSceneProxy* New();
00041   vtkTypeRevisionMacro(vtkSMAnimationSceneProxy, vtkSMAnimationCueProxy);
00042   void PrintSelf(ostream& os, vtkIndent indent);
00043 
00044 
00045   virtual void SaveInBatchScript(ofstream*);
00046 
00047   void Play();
00048   void Stop();
00049   int IsInPlay();
00050   
00051   void SetLoop(int loop);
00052   int GetLoop();
00053 
00054   void SetFrameRate(double framerate);
00055   double GetFrameRate();
00056 
00058 
00060   void SetPlayMode(int mode);
00061   int GetPlayMode();
00063 
00064   void AddCue(vtkSMProxy* cue);
00065   void RemoveCue(vtkSMProxy* cue);
00066  
00069   virtual void SetCaching(int enable); 
00070 
00076   void CleanCache();
00077   
00079 
00080   void SetRenderModuleProxy(vtkSMRenderModuleProxy* ren)
00081     { this->RenderModuleProxy = ren; } 
00083   
00084   void SetAnimationTime(double time);
00085 
00089   int SaveImages(const char* fileRoot, const char* ext, int width, int height, double framerate);
00090 
00093   int SaveGeometry(const char* filename);
00094 
00095 protected:
00096   vtkSMAnimationSceneProxy();
00097   ~vtkSMAnimationSceneProxy();
00098 
00099   // Called on every tick to save images.
00100   void SaveImages();
00101 
00102   // Called on every tick to save geometry.
00103   void SaveGeometry(double time);
00104 
00105   virtual void CreateVTKObjects(int numObjects);
00106 
00107   int GeometryCached; // flag indicating if this call asked RenderModuleProxy
00108     // to CacheUpdate.
00109 
00111 
00113   virtual void StartCueInternal(void* info);
00114   virtual void TickInternal(void* info);
00115   virtual void EndCueInternal(void* info);
00116   void CacheUpdate(void* info);
00118   
00119   vtkCollection* AnimationCueProxies;
00120   vtkCollectionIterator* AnimationCueProxiesIterator;
00121 
00122   vtkSMRenderModuleProxy* RenderModuleProxy;
00123 
00124   // Stuff for saving Animation Images.
00125   vtkImageWriter* ImageWriter;
00126   vtkGenericMovieWriter* MovieWriter;
00127   char* FileRoot;
00128   char* FileExtension;
00129   int FileCount;
00130   int SaveFailed;
00131   vtkSetStringMacro(FileRoot);
00132   vtkSetStringMacro(FileExtension);
00133 
00134   // Stuff for saving Geometry.
00135   vtkSMProxy *GeometryWriter;
00136 
00137 private:
00138   vtkSMAnimationSceneProxy(const vtkSMAnimationSceneProxy&); // Not implemented.
00139   void operator=(const vtkSMAnimationSceneProxy&); // Not implemented.
00140 
00141   // Used to store the magnification of the saved image
00142   int Magnification;
00143   int InSaveAnimation;
00144 };
00145 
00146 
00147 #endif
00148 

Generated on Tue May 30 12:31:47 2006 for ParaView by doxygen 1.3.5