00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
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
00100 void SaveImages();
00101
00102
00103 void SaveGeometry(double time);
00104
00105 virtual void CreateVTKObjects(int numObjects);
00106
00107 int GeometryCached;
00108
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
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
00135 vtkSMProxy *GeometryWriter;
00136
00137 private:
00138 vtkSMAnimationSceneProxy(const vtkSMAnimationSceneProxy&);
00139 void operator=(const vtkSMAnimationSceneProxy&);
00140
00141
00142 int Magnification;
00143 int InSaveAnimation;
00144 };
00145
00146
00147 #endif
00148