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

osg::ClusterViewBuffer Class Reference
[OpenSG Cluster support]

Viewbuffer functions. More...

#include <OSGClusterViewBuffer.h>

Collaboration diagram for osg::ClusterViewBuffer:

Collaboration graph
[legend]
List of all members.

Public Types

typedef std::vector< Int8BufferT
 stl vector used as char buffer

enum  {
  RED = 1, GREEN = 2, BLUE = 4, ALPHA = 8,
  STENCIL = 16, DEPTH = 32, RGB = RED|GREEN|BLUE, RGBA = RED|GREEN|BLUE|ALPHA
}
 Buffer component. More...


Public Methods

Constructors
 ClusterViewBuffer (void)
Destructor
virtual ~ClusterViewBuffer (void)
functions
void recv (Connection &connection)
 Receive image data from a network connection.

void send (Connection &connection, UInt32 component, UInt32 x1, UInt32 y1, UInt32 x2, UInt32 y2, UInt32 toX, UInt32 toY)
 Send parts of a view buffer to a Connection.

void send (Connection &connection, UInt32 component, UInt32 toX, UInt32 toY)
 Send parts of a view buffer to a Connection.

void setImgTransType (const char *mime=NULL)
 Set compression type.

void setSubtileSize (UInt32 size)
 Set subtile size.

UInt32 getBufferWidth ()
 Get buffer width.

UInt32 getBufferHeight ()
 Get buffer width.


Public Attributes

enum osg::ClusterViewBuffer:: { ... }  Component
 Buffer component.


Protected Attributes

Fields
ImageFileType_imgTransType
UInt32 _subTileSize

Private Methods

 ClusterViewBuffer (const ClusterViewBuffer &source)
void operator= (const ClusterViewBuffer &source)

Detailed Description

Viewbuffer functions.

This class provides an interface to an OpenGL view buffer. The Buffer contents can be transfered over a Connection. All Image types can be used for image compression. The ClusterViewBuffer can access RGBA, Stencil and Z-Buffer values.

The whole imagebuffer is divided into subtiles. Each subtile is read from the buffer, compressed and send over the nertwork. In most cases, the buffer read and the network send of the previous tile is done in parallel.

Todo:
currently ClusterViewBuffer works on the activated window. Is this a good idea. Better WindowPtr as parameter and then call activate before send,recv? MR


Member Typedef Documentation

typedef std::vector<Int8> osg::ClusterViewBuffer::BufferT
 

stl vector used as char buffer


Member Enumeration Documentation

anonymous enum
 

Buffer component.

Enumeration values:
RED 
GREEN 
BLUE 
ALPHA 
STENCIL 
DEPTH 
RGB 
RGBA 


Constructor & Destructor Documentation

ClusterViewBuffer::ClusterViewBuffer void   
 

Constructor documentation

Initialize a ClusterViewBuffer. By default, no image compression is set and the subtile size is set to 32

ClusterViewBuffer::~ClusterViewBuffer void    [virtual]
 

Destructor documentation

osg::ClusterViewBuffer::ClusterViewBuffer const ClusterViewBuffer &    source [private]
 


Member Function Documentation

void ClusterViewBuffer::recv Connection   connection
 

Receive image data from a network connection.

Receive image data from all channels of a conneciton. The receive is finished, when the last channel signals a transmission end.

Parameters:
connection  Connection from which read is done

void ClusterViewBuffer::send Connection   connection,
UInt32    component,
UInt32    x1,
UInt32    y1,
UInt32    x2,
UInt32    y2,
UInt32    toX,
UInt32    toY
 

Send parts of a view buffer to a Connection.

Parameters:
connection  send to this connection
component  Component to transfer
x1  left begin of rectangle to be transfered
y1  bottom begin of rectangle to be transfered
x2  right. The right pixel is included
x2  top. The top pixel is included
toX  copy to this x position on destination buffer
toY  copy to this y position on destination buffer

void ClusterViewBuffer::send Connection   connection,
UInt32    component,
UInt32    toX,
UInt32    toY
 

Send parts of a view buffer to a Connection.

Parameters:
connection  send to this connection
component  Component to transfer
toX  copy to this x position on destination buffer
toY  copy to this y position on destination buffer

void ClusterViewBuffer::setImgTransType const char *    mimeType = NULL
 

Set compression type.

By default, no compression is used for image transmission. The given mime type identifies an ImageType e.g. "JPEG". This image type is used for compression.

Parameters:
mimeType  Image mime type or NULL for no compression.

void ClusterViewBuffer::setSubtileSize UInt32    size
 

Set subtile size.

The whole buffer is transfered as small subtiles. Increasing or decreasing the subtile size will result in changes to the performance. The best size depends on network package size and the ration between network performance and buffer read/write performance.

Parameters:
size  Subtile size

UInt32 ClusterViewBuffer::getBufferWidth  
 

Get buffer width.

Returns:
current buffer width

UInt32 ClusterViewBuffer::getBufferHeight  
 

Get buffer width.

Returns:
current buffer height

void osg::ClusterViewBuffer::operator= const ClusterViewBuffer &    source [private]
 


Member Data Documentation

enum { ... } osg::ClusterViewBuffer::Component
 

Buffer component.

ImageFileType* osg::ClusterViewBuffer::_imgTransType [protected]
 

UInt32 osg::ClusterViewBuffer::_subTileSize [protected]
 


The documentation for this class was generated from the following files:
Generated on Wed Jul 3 16:32:45 2002 for OpenSG by doxygen1.2.16