00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00044 #ifndef __vtkSMComparativeVisProxy_h
00045 #define __vtkSMComparativeVisProxy_h
00046
00047 #include "vtkSMProxy.h"
00048
00049 class vtkSMAnimationCueProxy;
00050 class vtkSMPropertyAdaptor;
00051 class vtkSMProxy;
00052 class vtkSMRenderModuleProxy;
00053
00054 struct vtkSMComparativeVisProxyInternals;
00055
00056
00057 class VTK_EXPORT vtkSMComparativeVisProxy : public vtkSMProxy
00058 {
00059 public:
00060 static vtkSMComparativeVisProxy* New();
00061 vtkTypeRevisionMacro(vtkSMComparativeVisProxy, vtkSMProxy);
00062 void PrintSelf(ostream& os ,vtkIndent indent);
00063
00068 void Generate();
00069
00071
00073 vtkGetMacro(IsGenerated, int);
00075
00078 int Show();
00079
00082 void Hide();
00083
00085
00089 void AddCue(vtkSMProxy* cueProxy);
00090 void SetCue(unsigned int idx, vtkSMProxy* cueProxy);
00091 void SetNumberOfCues(unsigned int num);
00092 void SetNumberOfFramesInCue(unsigned int idx, unsigned int numValues);
00094
00096 void RemoveAllCues();
00097
00100 void Initialize();
00101
00106 void RemoveAllCache();
00107
00109 unsigned int GetNumberOfCues();
00110
00112 unsigned int GetNumberOfFramesInCue(unsigned int idx);
00113
00116 vtkSMAnimationCueProxy* GetCue(unsigned int idx);
00117
00119
00121 vtkGetObjectMacro(MultiActorHelper, vtkSMProxy);
00123
00125
00127 vtkSetStringMacro(Name);
00128 vtkGetStringMacro(Name);
00130
00132
00134 vtkSetMacro(ShouldAbort, int);
00135 vtkGetMacro(ShouldAbort, int);
00137
00139
00140 void SetRenderModule(vtkSMRenderModuleProxy* ren);
00141 vtkGetObjectMacro(RenderModule, vtkSMRenderModuleProxy);
00143
00145
00146 void SetSourceName(unsigned int idx, const char* sourceName);
00147 const char* GetSourceName(unsigned int idx);
00149
00151
00152 void SetSourceTclName(unsigned int idx, const char* sourceName);
00153 const char* GetSourceTclName(unsigned int idx);
00155
00157
00158 vtkSetMacro(NumberOfXFrames, unsigned int);
00159 vtkGetMacro(NumberOfXFrames, unsigned int);
00161
00163
00164 vtkSetMacro(NumberOfYFrames, unsigned int);
00165 vtkGetMacro(NumberOfYFrames, unsigned int);
00167
00168 protected:
00169 vtkSMComparativeVisProxy();
00170 ~vtkSMComparativeVisProxy();
00171
00172
00173
00174 void PlayOne(unsigned int idx);
00175
00176
00177
00178 void StoreGeometry();
00179
00180
00181
00182
00183
00184
00185 void ComputeIndices(unsigned int gidx);
00186 void ComputeIndex(unsigned int paramIdx, unsigned int gidx);
00187
00188
00189
00190 void ExecuteEvent(vtkObject* , unsigned long event, unsigned int paramIdx);
00191
00192
00193 static void AddBounds(double bounds[6], double totalB[6]);
00194
00195 vtkSMProxy* MultiActorHelper;
00196
00197 char* Name;
00198
00199 char* SourceName;
00200
00201 int InFirstShow;
00202
00203 int IsGenerated;
00204
00205 unsigned int NumberOfXFrames;
00206 unsigned int NumberOfYFrames;
00207
00208 void UpdateProgress(double progress);
00209
00210 vtkSMRenderModuleProxy* RenderModule;
00211
00212
00213 friend class vtkCVAnimationSceneObserver;
00214
00215
00216 private:
00217 void ComputeNumberOfFrames();
00218
00219 unsigned int NumberOfFrames;
00220 unsigned int CurrentFrame;
00221
00222 unsigned int PropertyIndex;
00223
00224
00225 vtkSMComparativeVisProxyInternals* Internal;
00226
00227 int ShouldAbort;
00228
00229 static const double BorderWidth;
00230
00231 vtkSMPropertyAdaptor* Adaptor;
00232
00233 vtkSMComparativeVisProxy(const vtkSMComparativeVisProxy&);
00234 void operator=(const vtkSMComparativeVisProxy&);
00235 };
00236
00237 #endif
00238