00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039 #ifndef _VIEWBUFFERHANDLER_H_
00040 #define _VIEWBUFFERHANDLER_H_
00041 #ifdef __sgi
00042 #pragma once
00043 #endif
00044
00045 #include <vector>
00046 #include <OSGSystemDef.h>
00047 #include <OSGBaseTypes.h>
00048 #include <OSGConnection.h>
00049
00050 OSG_BEGIN_NAMESPACE
00051
00052 class ImageFileType;
00053 class PointConnection;
00054 class GroupConnection;
00055
00056 class OSG_SYSTEMLIB_DLLMAPPING ClusterViewBuffer
00057 {
00058
00059 public:
00060
00062 enum {
00063 RED =1,
00064 GREEN =2,
00065 BLUE =4,
00066 ALPHA =8,
00067 STENCIL =16,
00068 DEPTH =32,
00069 RGB =RED|GREEN|BLUE,
00070 RGBA =RED|GREEN|BLUE|ALPHA
00071 } Component;
00073 typedef std::vector<Int8> BufferT;
00075 struct RGBValue
00076 {
00077 UInt8 red;
00078 UInt8 green;
00079 UInt8 blue;
00080 };
00081
00082
00086 ClusterViewBuffer(void);
00087 virtual ~ClusterViewBuffer(void);
00088
00090
00094 void recv( GroupConnection &connection );
00095 void send( PointConnection &connection,
00096 UInt32 component,
00097 UInt32 x1,
00098 UInt32 y1,
00099 UInt32 x2,
00100 UInt32 y2,
00101 UInt32 toX,
00102 UInt32 toY );
00103 void send( PointConnection &connection,
00104 UInt32 component,
00105 UInt32 toX,
00106 UInt32 toY );
00107
00109
00113 void setImgTransType (const char *mime=NULL );
00114 void setSubtileSize (UInt32 size );
00115 void setRGBADataType (UInt32 type,UInt32 size);
00116 void setRGBDataType (UInt32 type,UInt32 size);
00117 void setDepthDataType(UInt32 type,UInt32 size);
00118
00120
00124 UInt32 getBufferWidth();
00125 UInt32 getBufferHeight();
00126
00128
00129 protected:
00130
00134 ImageFileType *_imgTransType;
00135 UInt32 _subTileSize;
00136 UInt32 _rgbDataType;
00137 UInt32 _rgbDataSize;
00138 UInt32 _rgbaDataType;
00139 UInt32 _rgbaDataSize;
00140 UInt32 _depthDataType;
00141 UInt32 _depthDataSize;
00142
00144
00145 private:
00146
00147
00148 ClusterViewBuffer(const ClusterViewBuffer &source);
00149
00150 void operator =(const ClusterViewBuffer &source);
00151 };
00152
00153
00154 typedef ClusterViewBuffer *ClusterViewBufferP;
00155
00156 OSG_END_NAMESPACE
00157
00158 #define OSG_VIEWBUFFERHANDLER_HEADER_CVSID "@(#)$Id:$"
00159
00160 #endif