eq::Frame Class Reference

A holder for a frame data and parameters. More...

#include <frame.h>

Inheritance diagram for eq::Frame:

Inheritance graph
[legend]
Collaboration diagram for eq::Frame:

Collaboration graph
[legend]

List of all members.

Classes

struct  Data

Public Types

enum  Buffer {
  BUFFER_NONE = EQ_BIT_NONE, BUFFER_UNDEFINED = EQ_BIT1, BUFFER_COLOR = EQ_BIT5, BUFFER_DEPTH = EQ_BIT9,
  BUFFER_ALL = EQ_BIT_ALL
}
 The buffer format defines which components of the frame are to be used during recomposition. More...
enum  Type { TYPE_MEMORY, TYPE_TEXTURE }
 The storage type for pixel data. More...

Public Member Functions

 Frame ()
 Constructs a new Frame.
uint32_t getBuffers () const
void disableBuffer (const Buffer buffer)
 Disable the usage of a frame buffer attachment for all images.
void setColorType (const GLuint colorType)
 Set color buffer type to read.
void setAlphaUsage (const bool useAlpha)
 Enable/disable alpha usage for newly allocated images.
void useSendToken (const bool use)
Data Access
const std::string & getName () const
const Vector2igetOffset () const
void setOffset (const Vector2i &offset)
const RangegetRange () const
void setRange (const Range &range)
const PixelgetPixel () const
const ZoomgetZoom () const
void setZoom (const Zoom &zoom)
 Set zoom, used for frames created by user; normally zoom is set by server implicitly and not through this function.
const ImageVectorgetImages () const
 The images of this frame.
void setData (FrameData *data)
 Set the data for this frame.
FrameDatagetData ()
void setPixelViewport (const PixelViewport &pvp)
 Set the pixel viewport of the frame's data.
const net::ObjectVersiongetDataVersion (const Eye eye) const
Operations
void clear ()
 Clear the frame, recycles the images attached to the frame data.
void flush ()
 Clear the frame and free all images attached to the frame data.
void startReadback (Window::ObjectManager *glObjects)
 Read back a set of images according to the current frame data.
void syncReadback ()
 Synchronize the image readback.
void transmit (net::NodePtr toNode, const uint32_t frameNumber)
 Transmit the frame data to the specified node.
void setReady ()
 Set the frame ready.
bool isReady () const
 Test the readiness of the frame.
void waitReady () const
 Wait for the frame to become available.
void addListener (base::Monitor< uint32_t > &listener)
 Add a listener which will be incremented when the frame is ready.
void removeListener (base::Monitor< uint32_t > &listener)
 Remove a frame listener.

Protected Member Functions

virtual ChangeType getChangeType () const
virtual void getInstanceData (net::DataOStream &os)
 Serialize the instance information about this managed object.
virtual void applyInstanceData (net::DataIStream &is)
 Deserialize the instance data.

Friends

class eq::server::Frame
 The distributed data shared between Frame and server::Frame.


Detailed Description

A holder for a frame data and parameters.

Definition at line 46 of file lib/client/frame.h.


Member Enumeration Documentation

The buffer format defines which components of the frame are to be used during recomposition.

Enumerator:
BUFFER_UNDEFINED  Inherit, only if no others are set.
BUFFER_COLOR  Use color images.
BUFFER_DEPTH  Use depth images.

Definition at line 53 of file lib/client/frame.h.

The storage type for pixel data.

Enumerator:
TYPE_MEMORY  use main memory to store pixel data
TYPE_TEXTURE  use a GL texture to store pixel data

Definition at line 63 of file lib/client/frame.h.


Member Function Documentation

const Range & eq::Frame::getRange (  )  const

Returns:
the database-range relative to the destination channel.

Definition at line 72 of file lib/client/frame.cpp.

References eq::FrameData::getRange().

Here is the call graph for this function:

const Pixel & eq::Frame::getPixel (  )  const

Returns:
the pixel parameters relative to the destination channel.

Definition at line 66 of file lib/client/frame.cpp.

References eq::FrameData::getPixel().

Referenced by eq::Compositor::assembleFrame().

Here is the call graph for this function:

Here is the caller graph for this function:

const Zoom& eq::Frame::getZoom (  )  const [inline]

Returns:
the zoom factor for readback or assemble.

Definition at line 92 of file lib/client/frame.h.

Referenced by eq::Compositor::assembleFrame(), and eq::FrameData::startReadback().

Here is the caller graph for this function:

void eq::Frame::setData ( FrameData data  )  [inline]

Set the data for this frame.

Definition at line 102 of file lib/client/frame.h.

Referenced by eq::Pipe::getFrame().

Here is the caller graph for this function:

void eq::Frame::clear (  ) 

Clear the frame, recycles the images attached to the frame data.

Definition at line 96 of file lib/client/frame.cpp.

References eq::FrameData::clear().

Here is the call graph for this function:

void eq::Frame::flush (  ) 

Clear the frame and free all images attached to the frame data.

Definition at line 102 of file lib/client/frame.cpp.

References eq::FrameData::flush().

Referenced by eq::Pipe::flushFrames().

Here is the call graph for this function:

Here is the caller graph for this function:

void eq::Frame::startReadback ( Window::ObjectManager glObjects  ) 

Read back a set of images according to the current frame data.

The images are added to the frame, existing images are retained.

Parameters:
glObjects the GL object manager for the current GL context.

Definition at line 120 of file lib/client/frame.cpp.

References eq::FrameData::startReadback().

Referenced by eq::Channel::frameReadback().

Here is the call graph for this function:

Here is the caller graph for this function:

void eq::Frame::syncReadback (  ) 

Synchronize the image readback.

Definition at line 126 of file lib/client/frame.cpp.

References eq::FrameData::syncReadback().

Referenced by eq::Channel::frameReadback().

Here is the call graph for this function:

Here is the caller graph for this function:

void eq::Frame::transmit ( net::NodePtr  toNode,
const uint32_t  frameNumber 
)

Transmit the frame data to the specified node.

Used internally after readback to push the image data to the input frame nodes. Do not use directly.

Parameters:
toNode the receiving node.
frameNumber the current frame number

Definition at line 132 of file lib/client/frame.cpp.

References eq::FrameData::transmit().

Here is the call graph for this function:

void eq::Frame::setReady (  ) 

Set the frame ready.

The frame is automatically set ready by syncReadback and upon receiving of the transmit commands.

Definition at line 138 of file lib/client/frame.cpp.

References eq::FrameData::setReady().

Here is the call graph for this function:

bool eq::Frame::isReady (  )  const

Test the readiness of the frame.

The readiness of the frame is automatically managed by the frame buffer readback and transmit implementation.

Returns:
true if the frame is ready, false if not.

Definition at line 144 of file lib/client/frame.cpp.

References eq::FrameData::isReady().

Referenced by eq::Compositor::assembleFramesUnsorted().

Here is the call graph for this function:

Here is the caller graph for this function:

void eq::Frame::waitReady (  )  const

Wait for the frame to become available.

Definition at line 150 of file lib/client/frame.cpp.

References eq::FrameData::waitReady().

Referenced by eq::Compositor::assembleFramesSorted().

Here is the call graph for this function:

Here is the caller graph for this function:

void eq::Frame::addListener ( base::Monitor< uint32_t > &  listener  ) 

Add a listener which will be incremented when the frame is ready.

Parameters:
listener the listener.

Definition at line 169 of file lib/client/frame.cpp.

References eq::FrameData::addListener().

Referenced by eq::Compositor::assembleFramesUnsorted().

Here is the call graph for this function:

Here is the caller graph for this function:

void eq::Frame::removeListener ( base::Monitor< uint32_t > &  listener  ) 

Remove a frame listener.

Parameters:
listener the listener.

Definition at line 175 of file lib/client/frame.cpp.

References eq::FrameData::removeListener().

Referenced by eq::Compositor::assembleFramesUnsorted().

Here is the call graph for this function:

Here is the caller graph for this function:

uint32_t eq::Frame::getBuffers (  )  const

Returns:
the enabled frame buffer attachments.

Definition at line 60 of file lib/client/frame.cpp.

References eq::FrameData::getBuffers().

Referenced by eq::Compositor::assembleFrame().

Here is the call graph for this function:

Here is the caller graph for this function:

void eq::Frame::disableBuffer ( const Buffer  buffer  ) 

Disable the usage of a frame buffer attachment for all images.

Parameters:
buffer the buffer to disable.

Definition at line 156 of file lib/client/frame.cpp.

References eq::FrameData::disableBuffer().

Here is the call graph for this function:

void eq::Frame::setAlphaUsage ( const bool  useAlpha  ) 

Enable/disable alpha usage for newly allocated images.

Definition at line 114 of file lib/client/frame.cpp.

References eq::FrameData::setAlphaUsage().

Here is the call graph for this function:

void eq::Frame::useSendToken ( const bool  use  ) 

For internal use only.

Definition at line 162 of file lib/client/frame.cpp.

References eq::FrameData::useSendToken().

Here is the call graph for this function:

virtual ChangeType eq::Frame::getChangeType (  )  const [inline, protected, virtual]

Returns:
how the changes are to be handled.

Reimplemented from eq::net::Object.

Definition at line 202 of file lib/client/frame.h.

References eq::net::Object::INSTANCE.

void eq::Frame::getInstanceData ( net::DataOStream os  )  [protected, virtual]

Serialize the instance information about this managed object.

The default implementation uses the data provided by setInstanceData.

Parameters:
os The output stream.

Implements eq::net::Object.

Definition at line 44 of file lib/client/frame.cpp.

void eq::Frame::applyInstanceData ( net::DataIStream is  )  [protected, virtual]

Deserialize the instance data.

This method is called during object mapping to populate slave instances with the master object's data. The default implementation writes the data into the memory declared by setInstanceData.

Parameters:
is the input stream.

Implements eq::net::Object.

Definition at line 50 of file lib/client/frame.cpp.


Friends And Related Function Documentation

friend class eq::server::Frame [friend]

The distributed data shared between Frame and server::Frame.

Definition at line 211 of file lib/client/frame.h.


The documentation for this class was generated from the following files:
Generated on Mon Aug 10 18:58:42 2009 for Equalizer 0.9 by  doxygen 1.5.8