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

Servers/ServerManager/vtkSMComparativeVisProxy.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   ParaView
00004   Module:    $RCSfile: vtkSMComparativeVisProxy.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 =========================================================================*/
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 //BTX
00054 struct vtkSMComparativeVisProxyInternals;
00055 //ETX
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   // Create all the geometry for a property (and all the properties
00173   // after it). Call PlayOne(0) to create the geometry for all.
00174   void PlayOne(unsigned int idx);
00175 
00176   // Create geometry caches and displays for one case (i.e. fixed set 
00177   // of property values)
00178   void StoreGeometry();
00179 
00180   // All geometry caches and displays are stored consecutively in a vector.
00181   // To figure out which property indices an entry in the vector corresponds
00182   // to, call ComputeIndices(entryIdx). After this call, 
00183   // Internal->Indices vector will contain the right indices pointing to
00184   // the properties
00185   void ComputeIndices(unsigned int gidx);
00186   void ComputeIndex(unsigned int paramIdx, unsigned int gidx);
00187 
00188   // Used during comparative vis. generation. Called by the animation
00189   // scene proxy
00190   void ExecuteEvent(vtkObject* , unsigned long event, unsigned int paramIdx);
00191 
00192   // Gather two bounds (result is stored in the second argument)
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 //BTX
00213   friend class vtkCVAnimationSceneObserver;
00214 //ETX
00215 
00216 private:
00217   void ComputeNumberOfFrames();
00218 
00219   unsigned int NumberOfFrames;
00220   unsigned int CurrentFrame;
00221 
00222   unsigned int  PropertyIndex;
00223 
00224   // Private implementation
00225   vtkSMComparativeVisProxyInternals* Internal;
00226 
00227   int ShouldAbort;
00228 
00229   static const double BorderWidth;
00230 
00231   vtkSMPropertyAdaptor* Adaptor;
00232 
00233   vtkSMComparativeVisProxy(const vtkSMComparativeVisProxy&); // Not implemented.
00234   void operator=(const vtkSMComparativeVisProxy&); // Not implemented.
00235 };
00236 
00237 #endif
00238 

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