00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00041 #ifndef __vtkPVDesktopDeliveryClient_h
00042 #define __vtkPVDesktopDeliveryClient_h
00043
00044 #include "vtkParallelRenderManager.h"
00045
00046 class vtkCommand;
00047
00048 class VTK_EXPORT vtkPVDesktopDeliveryClient : public vtkParallelRenderManager
00049 {
00050 public:
00051 vtkTypeRevisionMacro(vtkPVDesktopDeliveryClient, vtkParallelRenderManager);
00052 virtual void PrintSelf(ostream &os, vtkIndent indent);
00053
00054 static vtkPVDesktopDeliveryClient *New();
00055
00062 virtual void SetUseCompositing(int v);
00063
00068 virtual void SetController(vtkMultiProcessController *controller);
00069
00070 virtual void ComputeVisiblePropBounds(vtkRenderer *ren, double bounds[6]);
00071
00073
00080 vtkGetMacro(RemoteDisplay, int);
00082
00083 vtkGetMacro(RemoteImageProcessingTime, double);
00084 vtkGetMacro(TransferTime, double);
00085 virtual double GetRenderTime() {
00086 return (this->RenderTime - this->RemoteImageProcessingTime);
00087 }
00088 virtual double GetImageProcessingTime() {
00089 return ( this->RemoteImageProcessingTime
00090 + this->TransferTime + this->ImageProcessingTime);
00091 }
00092
00093
00094 void SetSquirtLevel (int l)
00095 {
00096 if (l == 0)
00097 {
00098 this->SquirtOff();
00099 }
00100 else
00101 {
00102 this->SquirtOn();
00103 this->SetSquirtCompressionLevel(l-1);
00104 }
00105 }
00106
00108
00111 vtkGetMacro(Squirt, int);
00112 vtkSetMacro(Squirt, int);
00113 vtkBooleanMacro(Squirt, int);
00115
00117
00120 vtkGetMacro(SquirtCompressionLevel, int);
00121 vtkSetClampMacro(SquirtCompressionLevel, int, 0, 5);
00123
00125
00129 vtkGetMacro(Id, int);
00130 vtkSetMacro(Id, int);
00132
00134
00137 vtkGetMacro(AnnotationLayer, int);
00138 vtkSetMacro(AnnotationLayer, int);
00140
00142
00147 vtkGetVector2Macro(WindowPosition, int);
00148 vtkSetVector2Macro(WindowPosition, int);
00150
00152
00154 vtkGetVector2Macro(GUISize, int);
00155 vtkSetVector2Macro(GUISize, int);
00157
00158 virtual void SetImageReductionFactorForUpdateRate(double desiredUpdateRate);
00159 float GetZBufferValue(int x, int y);
00160
00162 virtual void ReceiveImageFromServer();
00163
00164 protected:
00165 vtkPVDesktopDeliveryClient();
00166 ~vtkPVDesktopDeliveryClient();
00167
00168 virtual void PreRenderProcessing();
00169 virtual void PostRenderProcessing();
00170
00171 int ServerProcessId;
00172
00173
00174 int RemoteDisplay;
00175 double RemoteImageProcessingTime;
00176 double TransferTime;
00177
00178 virtual void SendWindowInformation();
00179
00180
00181 int Squirt;
00182 int SquirtCompressionLevel;
00183 vtkUnsignedCharArray *SquirtBuffer;
00184
00185 void SquirtDecompress(vtkUnsignedCharArray *in, vtkUnsignedCharArray *out);
00186
00187 int UseCompositing;
00188
00189 int Id;
00190 int AnnotationLayer;
00191
00192 int WindowPosition[2];
00193 int GUISize[2];
00194
00195 int ReceivedImageFromServer;
00196 vtkCommand *ReceiveImageCallback;
00197
00198 private:
00199 vtkPVDesktopDeliveryClient(const vtkPVDesktopDeliveryClient &);
00200 void operator=(const vtkPVDesktopDeliveryClient &);
00201 };
00202
00203 #endif
00204