Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members File Members Related Pages
Parallel/vtkCompositeManager.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00054 #ifndef __vtkCompositeManager_h
00055 #define __vtkCompositeManager_h
00056
00057 #include "vtkObject.h"
00058
00059 class vtkTimerLog;
00060 class vtkFloatArray;
00061 class vtkDataArray;
00062 class vtkRenderWindow;
00063 class vtkRenderWindowInteractor;
00064 class vtkMultiProcessController;
00065 class vtkRenderer;
00066 class vtkCompositer;
00067 class vtkUnsignedCharArray;
00068
00069 class VTK_PARALLEL_EXPORT vtkCompositeManager : public vtkObject
00070 {
00071 public:
00072 static vtkCompositeManager *New();
00073 vtkTypeRevisionMacro(vtkCompositeManager,vtkObject);
00074 void PrintSelf(ostream& os, vtkIndent indent);
00075
00077
00079 vtkGetObjectMacro(RenderWindow, vtkRenderWindow);
00080 virtual void SetRenderWindow(vtkRenderWindow *renWin);
00082
00086 void InitializePieces();
00087
00089 void InitializeOffScreen();
00090
00092
00093 void StartInteractor();
00094 void ExitInteractor();
00095 virtual void StartRender();
00096 virtual void EndRender();
00097 virtual void SatelliteStartRender();
00098 virtual void SatelliteEndRender();
00099 void RenderRMI();
00100 void ResetCamera(vtkRenderer *ren);
00101 void ResetCameraClippingRange(vtkRenderer *ren);
00102 void ComputeVisiblePropBoundsRMI();
00104
00107 virtual void InitializeRMIs();
00108
00110
00115 void SetReductionFactor(int factor);
00116 vtkGetMacro(ReductionFactor, int);
00118
00120
00123 void SetUseChar(int useChar);
00124 vtkGetMacro(UseChar, int);
00125 vtkBooleanMacro(UseChar, int);
00127
00129
00134 void SetUseRGB(int useRGB);
00135 vtkGetMacro(UseRGB, int);
00136 vtkBooleanMacro(UseRGB, int);
00138
00140
00141 vtkSetMacro(UseCompositing, int);
00142 vtkGetMacro(UseCompositing, int);
00143 vtkBooleanMacro(UseCompositing, int);
00145
00147
00149 vtkGetMacro(GetBuffersTime, double);
00150 vtkGetMacro(SetBuffersTime, double);
00151 vtkGetMacro(CompositeTime, double);
00152 vtkGetMacro(MaxRenderTime, double);
00154
00156 float GetZ(int x, int y);
00157
00159
00162 void SetController(vtkMultiProcessController* controller);
00163 vtkGetObjectMacro(Controller, vtkMultiProcessController);
00165
00166
00167
00168 enum Tags {
00169 RENDER_RMI_TAG=12721,
00170 COMPUTE_VISIBLE_PROP_BOUNDS_RMI_TAG=56563,
00171 WIN_INFO_TAG=22134,
00172 REN_INFO_TAG=22135,
00173 BOUNDS_TAG=94135
00174 };
00175
00177
00180 virtual void CheckForAbortRender() {}
00181 virtual int CheckForAbortComposite() {return 0;}
00183
00184
00186 virtual void ComputeVisiblePropBounds(vtkRenderer *ren, float bounds[6]);
00187
00189
00193 vtkSetMacro(Manual, int);
00194 vtkGetMacro(Manual, int);
00195 vtkBooleanMacro(Manual, int);
00196 void Composite();
00198
00200
00202 virtual void SetCompositer(vtkCompositer*);
00203 vtkGetObjectMacro(Compositer, vtkCompositer);
00205
00207
00208 static void DeleteArray(vtkDataArray* da);
00209 static void ResizeFloatArray(vtkFloatArray* fa, int numComp,
00210 vtkIdType size);
00211 static void ResizeUnsignedCharArray(vtkUnsignedCharArray* uca,
00212 int numComp, vtkIdType size);
00214
00216
00219 void SetNumberOfProcesses(int numProcs);
00220 vtkGetMacro(NumberOfProcesses, int);
00222
00223 protected:
00224 vtkCompositeManager();
00225 ~vtkCompositeManager();
00226
00227 void SetRendererSize(int x, int y);
00228 void MagnifyBuffer(vtkDataArray *localPdata, vtkDataArray* magPdata,
00229 int windowSize[2]);
00230
00231 void ReallocPDataArrays();
00232
00233 vtkRenderWindow* RenderWindow;
00234 vtkRenderWindowInteractor* RenderWindowInteractor;
00235 vtkMultiProcessController* Controller;
00236
00237 unsigned long StartInteractorTag;
00238 unsigned long EndInteractorTag;
00239 unsigned long StartTag;
00240 unsigned long EndTag;
00241 unsigned long ResetCameraTag;
00242 unsigned long ResetCameraClippingRangeTag;
00243 int UseChar;
00244 int UseRGB;
00245 int UseCompositing;
00246
00247
00248
00249
00250 void SetRenderWindowInteractor(vtkRenderWindowInteractor *iren);
00251
00252
00253 vtkCompositer *Compositer;
00254 int NumberOfProcesses;
00255
00256
00257 vtkDataArray *PData;
00258 vtkFloatArray *ZData;
00259 vtkDataArray *LocalPData;
00260 vtkFloatArray *LocalZData;
00261 int RendererSize[2];
00262
00263
00264 int ReductionFactor;
00265
00266
00267
00268
00269
00270
00271 int Lock;
00272
00273 double GetBuffersTime;
00274 double SetBuffersTime;
00275 double CompositeTime;
00276 double MaxRenderTime;
00277
00278
00279 vtkTimerLog *Timer;
00280
00281
00282 int Manual;
00283
00284 int FirstRender;
00285
00286 private:
00287 vtkCompositeManager(const vtkCompositeManager&);
00288 void operator=(const vtkCompositeManager&);
00289 };
00290
00291 #endif