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

Servers/Filters/vtkMultiDisplayManager.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   ParaView
00004   Module:    $RCSfile: vtkMultiDisplayManager.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 =========================================================================*/
00027 #ifndef __vtkMultiDisplayManager_h
00028 #define __vtkMultiDisplayManager_h
00029 
00030 #include "vtkParallelRenderManager.h"
00031 
00032 class vtkRenderWindow;
00033 class vtkMultiProcessController;
00034 class vtkSocketController;
00035 class vtkRenderer;
00036 class vtkCamera;
00037 class vtkTiledDisplaySchedule;
00038 class vtkPVCompositeUtilities;
00039 class vtkFloatArray;
00040 class vtkUnsignedCharArray;
00041 class vtkPVMultiDisplayInfo;
00042 class vtkPVCompositeBuffer;
00043 
00044 class VTK_EXPORT vtkMultiDisplayManager : public vtkParallelRenderManager
00045 {
00046 public:
00047   static vtkMultiDisplayManager *New();
00048   vtkTypeRevisionMacro(vtkMultiDisplayManager,vtkParallelRenderManager);
00049   void PrintSelf(ostream& os, vtkIndent indent);
00050 
00053   virtual void SetRenderWindow(vtkRenderWindow *renWin);
00054 
00056   virtual void ClientEndRender();
00057   
00060   virtual void InitializeRMIs();
00061   
00065   void SetController(vtkMultiProcessController* controller);
00066 
00068 
00069   void SetSocketController(vtkSocketController* controller);
00070   vtkGetObjectMacro(SocketController, vtkSocketController);
00072 
00074 
00076   vtkSetVector2Macro(TileDimensions, int);
00077   vtkGetVector2Macro(TileDimensions, int);
00079 
00081 
00083   unsigned long GetMaximumMemoryUsage();
00084   void SetMaximumMemoryUsage(unsigned long mem);
00085   unsigned long GetTotalMemoryUsage();
00087 
00088   //============================================================
00089   // New compositing methods.
00090 
00091   void InitializeSchedule();
00092 
00094 
00095   vtkSetMacro(UseCompositeCompression, int);
00096   vtkGetMacro(UseCompositeCompression, int);
00097   vtkBooleanMacro(UseCompositeCompression, int);
00099 
00101 
00105   void SetImageReductionFactor(double f) {this->SetLODReductionFactor((int)f);}
00106   vtkSetMacro(LODReductionFactor, int);
00107   vtkGetMacro(LODReductionFactor, int);
00109 
00111 
00112   vtkGetObjectMacro(CompositeUtilities,vtkPVCompositeUtilities);
00114 
00116 
00117   void ComputeCamera(float *o, float *x, float *y,
00118                      float *p, vtkCamera* cam);
00120 
00122 
00124   vtkSetMacro(ClientFlag,int);
00125   vtkGetMacro(ClientFlag,int);
00127 
00129 
00131   vtkSetMacro(ZeroEmpty,int);
00132   vtkGetMacro(ZeroEmpty,int);
00134 
00136   float GetZBufferValue(int x, int y);
00137   
00139 
00140   void ClientStartRender();
00141   void RootStartRender(vtkPVMultiDisplayInfo info);
00142   void SatelliteStartRender();
00144 
00145 //ETX
00146 protected:
00147   vtkMultiDisplayManager();
00148   ~vtkMultiDisplayManager();
00149 
00150   int ClientFlag;
00151   
00152   vtkSocketController* SocketController;
00153 
00154   // For managing buffers.
00155   vtkPVCompositeUtilities* CompositeUtilities;
00156 
00157   // Abstracting buffer storage, so we can rander on demand
00158   // and free buffers as soon as possible.
00159   vtkPVCompositeBuffer** TileBuffers;
00160   int TileBufferArrayLength;
00161   // Gets the stored buffer.  Renders if necessary.
00162   vtkPVCompositeBuffer* GetTileBuffer(int tileId);
00163   // Does refernce counting properly.
00164   void SetTileBuffer(int tileIdx, vtkPVCompositeBuffer* buf);
00165   // Length 0 frees the array.
00166   void InitializeTileBuffers(int length);
00167 
00168   void SetupCamera(int tileIdx, int reduction);
00169 
00170 
00171   int ImageReductionFactor;
00172   int LODReductionFactor;
00173 
00174   unsigned long StartTag;
00175   unsigned long EndTag;
00176   
00177   // Any processes can display the tiles.
00178   // There can be more processes than tiles.
00179   int TileDimensions[2];
00180   int NumberOfProcesses;
00181 
00182   vtkTiledDisplaySchedule* Schedule;
00183   int ZeroEmpty;
00184 
00185   int UseCompositeCompression;
00186 
00187   void Composite();
00188 
00189   void PreRenderProcessing() {}
00190   void PostRenderProcessing() {}
00191   void InternalSatelliteStartRender(vtkPVMultiDisplayInfo info);
00192   
00193 private:
00194   vtkMultiDisplayManager(const vtkMultiDisplayManager&); // Not implemented
00195   void operator=(const vtkMultiDisplayManager&); // Not implemented
00196 };
00197 
00198 #endif

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