OpenGL Vizserver Reference Page


NAME
vsFieldInfo - Definition of field information contents

INHERITS FROM
vsParamTypeCls : vsCmprParamTypeCls

HEADER FILE
#include <vizserver/vsFrame.h>

PUBLIC METHOD SUMMARY

   Creating and destroying
vsFieldInfo ( vsUInt frameID, vsUInt drawableID, vsEnum fieldID, vsEnum format, vsEnum type, vsShort x, vsShort y, vsUShort w, vsUShort h);
virtual ~vsFieldInfo (  );

   Accessing a field description
inline vsUInt getFrameID (  ) const;
inline vsUInt getDrawableID (  ) const;
inline vsEnum getFieldID (  ) const;
inline vsEnum getFormat (  ) const;
inline vsEnum getType (  ) const;
inline vsShort getX (  ) const;
inline vsShort getY (  ) const;
inline vsUShort getWidth (  ) const;
inline vsUShort getHeight (  ) const;
vsBool isParamTypeSupported ( vsParamTypes::Base) const;
inline vsCmprParamTypesFieldParams getParamName (  ) const;

INHERITED PUBLIC METHODS

   Inherited from vsCmprParamTypeCls
virtual ParamGroup getParamName (  ) const;

   Inherited from vsParamTypeCls
virtual vsBool isParamTypeSupported ( vsParamTypes::Base name) const;

CLASS DESCRIPTION
Images rendered by an application and transported to the client system are captured in frames. A frame consists of multiple fields, each field having a specific type. There are two basic field types: color and depth. Within each type, there are several subtypes for the left and right eyes for stereo rendered images. Frames are represented by vsFrameData and vsFrameInfo objects.

vsFieldInfo is also a vsParamTypeCls and can be extracted from various query container types.

METHOD DESCRIPTIONS

   vsFieldInfo()
vsFieldInfo ( vsUInt frameID, vsUInt drawableID, vsEnum fieldID, vsEnum format, vsEnum type, vsShort x, vsShort y, vsUShort w, vsUShort h);

Constructs a new vsFieldInfo object. The frame from which the field originates is identified by the frameID and drawableID arguments. The values for these two arguments are determined by the caller, but should allow for a receiver of the frame field to correlate the field with others from the same drawable.

The specific field within the frame is given by the fieldID. This argument can take on any one of the valid field types vsFieldTypes::Color (color image), vsFieldTypes::ColorLeft (left color image for stereo), vsFieldTypes::ColorRight (right color image for stereo), vsFieldTypes::Depth (depth image), vsFieldTypes::DepthLeft (left depth image) or vsFieldTypes::DepthRight (right depth image).

It is important to understand the structure of pixel data passed into a compressor and requested for output to the client. The format of the pixels contained in the field is defined by format and type. The pixel data is first organzied in a particular format by the format, that can be one of the following:

vsFieldPixelFormats::Index color index pixels
vsFieldPixelFormats::L luminance pixels
vsFieldPixelFormats::LA luminance-alpha pixels
vsFieldPixelFormats::RGB RGB pixels
vsFieldPixelFormats::RGBA RGBA pixels
vsFieldPixelFormats::Depth Depth components

Within each pixel format there are components,i.e. red, green, and blue for color data, each of which has a particular data type. The component types are given by type. The acceptable component types are:

vsFieldPixelTypes::Byte signed byte
vsFieldPixelTypes::UByte unsigned byte
vsFieldPixelTypes::Short signed short (16 bit)
vsFieldPixelTypes::UShort unsigned short
vsFieldPixelTypes::Int integer (32 bit)
vsFieldPixelTypes::UInt unsigned integer
vsFieldPixelTypes::Float floating point (32 bit)

For example 24-bit color data can be simulated by either vsFieldPixelFormats::RGB and vsFieldPixelTypes::Byte, or by vsFieldPixelFormats::RGB and vsFieldPixelTypes::UByte.

The origin of the field is given by x and y. The size of the field in pixels is given by w and h. These arguments combined with the pixel format define the layout of data within the field. The data is stored with all components of a pixel grouped in adjacent memory locations (interleaved). Pixels are further aggregated by line, in groups of w with h lines comprising the field.

The field interface makes no assumptions about orientation of the image within the frame (e.g., upper-left or lower-left origin) and this assumption is not necessary for proper functioning of most aspects of the compression system, as long as a consistent method is used. OpenGL Vizserver, however, does fix the orientation internally to lower-left origin, scanning left to right by pixel.

   ~vsFieldInfo()
virtual ~vsFieldInfo (  );

Destroys the field structure.

   getDrawableID()
inline vsUInt getDrawableID (  ) const;

Returns the drawable identifier for this field tile. This combined with the frame identifier (see getFrameID()) should uniquely identify the associated frame. The meaning of the drawable identifier is determined by the application.

   getFieldID()
inline vsEnum getFieldID (  ) const;

Returns the field type for this field.

   getFormat()
inline vsEnum getFormat (  ) const;

Returns the pixel format for this field.

   getFrameID()
inline vsUInt getFrameID (  ) const;

Returns a unique frame identifier. This identifier need only be unique within the context of the drawable (see getDrawableID()). While the definition of the frame identifier is application specified, it must be unique when faced with multiple active frames for the same drawable.

   getHeight()
inline vsUShort getHeight (  ) const;

Returns the height of the field in pixels.

   getParamName()
inline vsCmprParamTypesFieldParams getParamName (  ) const;

Returns the specific parameter name associated with this parameter. vsFieldInfo can return two different parameter names: vsCmprParamTypes::FieldInfo in circumstances where it is contained within a vsFrameInfo object and vsCmprParamTypes::FieldInfoParam in circumstances where it is contained within the more generic vsCmprParamArg object.

   getType()
inline vsEnum getType (  ) const;

Returns the component type for this field's pixels.

   getWidth()
inline vsUShort getWidth (  ) const;

Returns the width of the field in pixels.

   getX()
inline vsShort getX (  ) const;

Returns the origin in x of the filed with respect to the drawable (usually 0).

   getY()
inline vsShort getY (  ) const;

Returns the origin in y of the field with respect to the drawable (usually 0).

   isParamTypeSupported()
vsBool isParamTypeSupported ( vsParamTypes::Base) const;

Returns TRUE if this object belongs to the parameter type family specified by vsParamTypes::Base argument. vsFieldInfo initially belongs to the vsParamTypes::CmprParam family.

SEE ALSO
vsCmprParamTypeCls, vsFrameData, vsFrameInfo, vsParamTypeCls