Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

OSGClusterViewBuffer.h

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------------*\
00002  *                                OpenSG                                     *
00003  *                                                                           *
00004  *                                                                           *
00005  *             Copyright (C) 2000-2002 by the OpenSG Forum                   *
00006  *                                                                           *
00007  *                            www.opensg.org                                 *
00008  *                                                                           *
00009  *   contact: dirk@opensg.org, gerrit.voss@vossg.org, jbehr@zgdv.de          *
00010  *                                                                           *
00011 \*---------------------------------------------------------------------------*/
00012 /*---------------------------------------------------------------------------*\
00013  *                                License                                    *
00014  *                                                                           *
00015  * This library is free software; you can redistribute it and/or modify it   *
00016  * under the terms of the GNU Library General Public License as published    *
00017  * by the Free Software Foundation, version 2.                               *
00018  *                                                                           *
00019  * This library is distributed in the hope that it will be useful, but       *
00020  * WITHOUT ANY WARRANTY; without even the implied warranty of                *
00021  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU         *
00022  * Library General Public License for more details.                          *
00023  *                                                                           *
00024  * You should have received a copy of the GNU Library General Public         *
00025  * License along with this library; if not, write to the Free Software       *
00026  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.                 *
00027  *                                                                           *
00028 \*---------------------------------------------------------------------------*/
00029 /*---------------------------------------------------------------------------*\
00030  *                                Changes                                    *
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     /*==========================  PUBLIC  =================================*/
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     /*=========================  PROTECTED  ===============================*/
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     /*==========================  PRIVATE  ================================*/
00145   private:
00146 
00147     /* prohibit default function (move to 'public' if needed) */
00148     ClusterViewBuffer(const ClusterViewBuffer &source);
00149     /* prohibit default function (move to 'public' if needed) */
00150     void operator =(const ClusterViewBuffer &source);
00151 };
00152 
00153 // class pointer
00154 typedef ClusterViewBuffer *ClusterViewBufferP;
00155 
00156 OSG_END_NAMESPACE
00157 
00158 #define OSG_VIEWBUFFERHANDLER_HEADER_CVSID "@(#)$Id:$"
00159 
00160 #endif /* _VIEWBUFFERHANDLER_H_ */

Generated on Thu Aug 25 04:01:54 2005 for OpenSG by  doxygen 1.4.3