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

Servers/Filters/vtkIceTRenderManager.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   ParaView
00004   Module:    $RCSfile: vtkIceTRenderManager.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 =========================================================================*/
00015 /*----------------------------------------------------------------------------
00016  Copyright (c) Sandia Corporation
00017  See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details.
00018 ----------------------------------------------------------------------------*/
00019 
00051 #ifndef __vtkIceTRenderManager_h
00052 #define __vtkIceTRenderManager_h
00053 
00054 #include "vtkParallelRenderManager.h"
00055 
00056 class vtkIceTRenderer;
00057 class vtkIntArray;
00058 class vtkPerspectiveTransform;
00059 class vtkPKdTree;
00060 
00061 class VTK_EXPORT vtkIceTRenderManager : public vtkParallelRenderManager
00062 {
00063 public:
00064   static vtkIceTRenderManager *New();
00065   vtkTypeRevisionMacro(vtkIceTRenderManager, vtkParallelRenderManager);
00066   virtual void PrintSelf(ostream &os, vtkIndent indent);
00067 
00068   virtual vtkRenderer *MakeRenderer();
00069 
00070   virtual void SetController(vtkMultiProcessController *controller);
00071 
00072   virtual void SetRenderWindow(vtkRenderWindow *renwin);
00073 
00075 
00080   virtual void SetTileDimensions(int tilesX, int tilesY);
00081   void SetTileDimensions(int dims[2])
00082     { this->SetTileDimensions(dims[0], dims[1]); }
00083   vtkGetVector2Macro(TileDimensions, int);
00085 
00087 
00092   virtual int GetTileRank(int x, int y);
00093   virtual void SetTileRank(int x, int y, int rank);
00095 
00096   virtual double GetRenderTime();
00097   virtual double GetImageProcessingTime();
00098   virtual double GetBufferReadTime();
00099   virtual double GetBufferWriteTime();
00100   virtual double GetCompositeTime();
00101 
00102 //BTX
00103   enum StrategyType {
00104     DEFAULT, REDUCE, VTREE, SPLIT, SERIAL, DIRECT
00105   };
00106 //ETX
00107 
00109 
00111   virtual void SetStrategy(int strategy);
00112   virtual void SetStrategy(const char *strategy);
00113   void SetStrategyToDefault() { this->SetStrategy(DEFAULT); }
00114   void SetStrategyToReduce() { this->SetStrategy(REDUCE); }
00115   void SetStrategyToVtree() { this->SetStrategy(VTREE); }
00116   void SetStrategyToSplit() { this->SetStrategy(SPLIT); }
00117   void SetStrategyToSerial() { this->SetStrategy(SERIAL); }
00118   void SetStrategyToDirect() { this->SetStrategy(DIRECT); }
00120 
00121 //BTX
00122   enum ComposeOperationType {
00123     ComposeOperationClosest = 0,
00124     ComposeOperationOver = 1
00125   };
00126 //ETX
00127 
00129 
00132   virtual void SetComposeOperation(int operation);
00133   // Description:
00134   // Sets the compose operation to pick the pixel color that is closest to
00135   // the camera (determined by the z-buffer).  This operation is
00136   // commutative.  This is the default operation.
00137   void SetComposeOperationToClosest() {
00138     this->SetComposeOperation(ComposeOperationClosest);
00139   }
00140   // Description:
00141   // Sets the compose operation to blend colors using the Porter and Duff
00142   // OVER operator.  This operation is not commutative (order of
00143   // composition matters).
00144   void SetComposeOperationToOver() {
00145     this->SetComposeOperation(ComposeOperationOver);
00146   }
00148 
00161   virtual void SetSortingKdTree(vtkPKdTree *tree);
00162 
00174   virtual void SetDataReplicationGroup(vtkIntArray *group);
00175 
00181   virtual void SetDataReplicationGroupColor(int color);
00182 
00185   virtual void RecordIceTImage(vtkIceTRenderer *);
00186 
00189   virtual void ForceImageWriteback();
00190 
00191 protected:
00192   vtkIceTRenderManager();
00193   virtual ~vtkIceTRenderManager();
00194 
00195   virtual void UpdateIceTContext();
00196 
00197   virtual void SendWindowInformation();
00198   virtual void ReceiveWindowInformation();
00199 
00200   virtual void SendRendererInformation(vtkRenderer *);
00201   virtual void ReceiveRendererInformation(vtkRenderer *);
00202 
00203   virtual void PreRenderProcessing();
00204   virtual void PostRenderProcessing();
00205 
00206   int ContextDirty;
00207   vtkTimeStamp ContextUpdateTime;
00208 
00209   int TileDimensions[2];
00210   int **TileRanks;
00211   int TilesDirty;
00212   int CleanScreenWidth;
00213   int CleanScreenHeight;
00214 
00217   double LastKnownImageReductionFactor;
00218 
00219   vtkCommand *RecordIceTImageCallback;
00220   vtkCommand *FixRenderWindowCallback;
00221 
00223 
00224   vtkPerspectiveTransform *TileViewportTransform;
00225   vtkGetObjectMacro(TileViewportTransform, vtkPerspectiveTransform);
00226   virtual void SetTileViewportTransform(vtkPerspectiveTransform *arg);
00228 
00229   virtual void ComputeTileViewportTransform();
00230 
00231   virtual int ImageReduceRenderer(vtkRenderer *);
00232 
00235   vtkDoubleArray *LastViewports;
00236 
00237   vtkUnsignedCharArray *InflateImageBuffer;
00238 
00240 
00242   void GetGlobalViewport(int viewport[4]);
00243   void GetTileViewport(int x, int y, int viewport[4]);
00245 
00246 private:
00247   vtkIceTRenderManager(const vtkIceTRenderManager&); // Not implemented
00248   void operator=(const vtkIceTRenderManager&); // Not implemented
00249 };
00250 
00251 
00252 #endif //__vtkIceTRenderManager_h

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