00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00034 #ifndef __vtkDesktopDeliveryClient_h
00035 #define __vtkDesktopDeliveryClient_h
00036
00037 #include "vtkParallelRenderManager.h"
00038
00039 class vtkCommand;
00040
00041 class VTK_EXPORT vtkDesktopDeliveryClient : public vtkParallelRenderManager
00042 {
00043 public:
00044 vtkTypeRevisionMacro(vtkDesktopDeliveryClient, vtkParallelRenderManager);
00045 virtual void PrintSelf(ostream &os, vtkIndent indent);
00046
00047 static vtkDesktopDeliveryClient *New();
00048
00055 virtual void SetUseCompositing(int v);
00056
00061 virtual void SetController(vtkMultiProcessController *controller);
00062
00063 virtual void SetRenderWindow(vtkRenderWindow *renWin);
00064
00066
00071 vtkSetMacro(ReplaceActors, int);
00072 vtkGetMacro(ReplaceActors, int);
00073 vtkBooleanMacro(ReplaceActors, int);
00075
00076 virtual void ComputeVisiblePropBounds(vtkRenderer *ren, double bounds[6]);
00077
00079
00086 vtkGetMacro(RemoteDisplay, int);
00088
00089 vtkGetMacro(RemoteImageProcessingTime, double);
00090 vtkGetMacro(TransferTime, double);
00091 virtual double GetRenderTime() {
00092 return (this->RenderTime - this->RemoteImageProcessingTime);
00093 }
00094 virtual double GetImageProcessingTime() {
00095 return ( this->RemoteImageProcessingTime
00096 + this->TransferTime + this->ImageProcessingTime);
00097 }
00098
00099
00100 void SetSquirtLevel (int l)
00101 {
00102 if (l == 0)
00103 {
00104 this->SquirtOff();
00105 }
00106 else
00107 {
00108 this->SquirtOn();
00109 this->SetSquirtCompressionLevel(l-1);
00110 }
00111 }
00112
00114
00117 vtkGetMacro(Squirt, int);
00118 vtkSetMacro(Squirt, int);
00119 vtkBooleanMacro(Squirt, int);
00121
00123
00126 vtkGetMacro(SquirtCompressionLevel, int);
00127 vtkSetClampMacro(SquirtCompressionLevel, int, 0, 5);
00129
00130 virtual void SetImageReductionFactorForUpdateRate(double desiredUpdateRate);
00131 float GetZBufferValue(int x, int y);
00132
00134 virtual void ReceiveImageFromServer();
00135
00136 protected:
00137 vtkDesktopDeliveryClient();
00138 ~vtkDesktopDeliveryClient();
00139
00140 virtual void PreRenderProcessing();
00141 virtual void PostRenderProcessing();
00142
00143 int ServerProcessId;
00144
00145 int ReplaceActors;
00146
00147
00148 int RemoteDisplay;
00149 double RemoteImageProcessingTime;
00150 double TransferTime;
00151
00152 virtual void SendWindowInformation();
00153
00154
00155 int Squirt;
00156 int SquirtCompressionLevel;
00157 vtkUnsignedCharArray *SquirtBuffer;
00158
00159 void SquirtDecompress(vtkUnsignedCharArray *in, vtkUnsignedCharArray *out);
00160
00161 int UseCompositing;
00162
00163 int ReceivedImageFromServer;
00164 vtkCommand *ReceiveImageCallback;
00165
00166 private:
00167 vtkDesktopDeliveryClient(const vtkDesktopDeliveryClient &);
00168 void operator=(const vtkDesktopDeliveryClient &);
00169 };
00170
00171 #endif
00172