eq::FrameData Class Reference

A frame data holds multiple images and is used by frames. More...

#include <frameData.h>

Inheritance diagram for eq::FrameData:

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

Collaboration graph
[legend]

List of all members.

Classes

struct  Data
struct  ImageVersion

Public Member Functions

void update (const uint32_t version)
Data Access
uint32_t getBuffers () const
 The enabled frame buffer attachments.
void setBuffers (const uint32_t buffers)
const RangegetRange () const
 The database-range relative to the destination channel.
void setRange (const Range &range)
const PixelgetPixel () const
 The pixel decomposition relative to the destination channel.
const ImageVectorgetImages () const
 The images of this frame data holder.
void setPixelViewport (const PixelViewport &pvp)
 The covered area.
void setColorType (const GLuint colorType)
void setAlphaUsage (const bool useAlpha)
 Enable/disable alpha usage for newly allocated images.
Operations
void flush ()
 Flush the frame by deleting all images.
ImagenewImage (const Frame::Type type=Frame::TYPE_MEMORY)
 Allocate and add a new image.
void clear ()
 Clear the frame by recycling the attached images.
void startReadback (const Frame &frame, Window::ObjectManager *glObjects)
 Read back a set of images according to the current frame data.
void syncReadback ()
 Synchronize the last image readback.
void transmit (net::NodePtr toNode, const uint32_t frameNumber)
 Transmit the frame data to the specified node.
void setReady ()
 Set the frame data ready.
bool isReady () const
void waitReady () const
 Wait for the frame data 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.
void disableBuffer (const Frame::Buffer buffer)
 Disable the usage of a frame buffer attachment for all images.
void useSendToken (const bool use)

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.
virtual void attachToSession (const uint32_t id, const uint32_t instanceID, net::Session *session)

Friends

class eq::server::FrameData


Detailed Description

A frame data holds multiple images and is used by frames.

It is not intended to be used directly by application code.

Definition at line 48 of file lib/client/frameData.h.


Member Function Documentation

uint32_t eq::FrameData::getBuffers (  )  const [inline]

The enabled frame buffer attachments.

Definition at line 59 of file lib/client/frameData.h.

Referenced by eq::Frame::getBuffers().

Here is the caller graph for this function:

const Range& eq::FrameData::getRange (  )  const [inline]

The database-range relative to the destination channel.

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

Referenced by eq::Frame::getRange().

Here is the caller graph for this function:

const Pixel& eq::FrameData::getPixel (  )  const [inline]

The pixel decomposition relative to the destination channel.

Definition at line 67 of file lib/client/frameData.h.

Referenced by eq::Frame::getPixel().

Here is the caller graph for this function:

void eq::FrameData::setPixelViewport ( const PixelViewport pvp  )  [inline]

The covered area.

Definition at line 73 of file lib/client/frameData.h.

Referenced by eq::Frame::setPixelViewport().

Here is the caller graph for this function:

void eq::FrameData::setAlphaUsage ( const bool  useAlpha  )  [inline]

Enable/disable alpha usage for newly allocated images.

Definition at line 79 of file lib/client/frameData.h.

Referenced by eq::Frame::setAlphaUsage().

Here is the caller graph for this function:

void eq::FrameData::flush (  ) 

Flush the frame by deleting all images.

Definition at line 119 of file lib/client/frameData.cpp.

References clear(), and eq::Image::flush().

Referenced by eq::Frame::flush().

Here is the call graph for this function:

Here is the caller graph for this function:

Image * eq::FrameData::newImage ( const Frame::Type  type = Frame::TYPE_MEMORY  ) 

Allocate and add a new image.

Returns:
the image.

Definition at line 134 of file lib/client/frameData.cpp.

Referenced by startReadback().

Here is the caller graph for this function:

void eq::FrameData::clear (  ) 

Clear the frame by recycling the attached images.

Definition at line 108 of file lib/client/frameData.cpp.

References eq::base::Lock::set(), and eq::base::Lock::unset().

Referenced by applyInstanceData(), eq::Frame::clear(), and flush().

Here is the call graph for this function:

Here is the caller graph for this function:

void eq::FrameData::startReadback ( const Frame frame,
Window::ObjectManager glObjects 
)

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

The newly read images are added to the data, existing images are retained.

Parameters:
frame the corresponding output frame holder.
glObjects the GL object manager for the current GL context.

Definition at line 187 of file lib/client/frameData.cpp.

References eq::Frame::BUFFER_DEPTH, EQWARN, eq::ROIFinder::findRegions(), eq::Frame::getOffset(), eq::Frame::getZoom(), eq::PixelViewport::intersect(), eq::Zoom::isValid(), eq::PixelViewport::isValid(), newImage(), eq::Image::setOffset(), eq::Image::startReadback(), eq::PixelViewport::x, and eq::PixelViewport::y.

Referenced by eq::Frame::startReadback().

Here is the call graph for this function:

Here is the caller graph for this function:

void eq::FrameData::syncReadback (  ) 

Synchronize the last image readback.

Definition at line 225 of file lib/client/frameData.cpp.

References setReady(), eq::Image::syncReadback(), and eq::Image::writeImages().

Referenced by eq::Frame::syncReadback().

Here is the call graph for this function:

Here is the caller graph for this function:

void eq::FrameData::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 286 of file lib/client/frameData.cpp.

References eq::Frame::BUFFER_COLOR, eq::Frame::BUFFER_DEPTH, eq::Image::compressPixelData(), eq::ConfigEvent::data, EQWARN, eq::StatisticSampler< Owner >::event, eq::Statistic::frameNumber, eq::net::Object::getID(), eq::net::Session::getID(), eq::net::Object::getLocalNode(), eq::Image::getPixelData(), eq::Image::getPixelDataSize(), eq::Image::getPixelViewport(), eq::net::Object::getSession(), eq::net::Object::getVersion(), eq::Image::hasPixelData(), eq::Image::ignoreAlpha(), eq::Statistic::ratio, eq::Event::statistic, and eq::Frame::TYPE_TEXTURE.

Referenced by eq::Frame::transmit().

Here is the call graph for this function:

Here is the caller graph for this function:

void eq::FrameData::setReady (  ) 

Set the frame data ready.

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

Definition at line 247 of file lib/client/frameData.cpp.

References eq::net::Object::getVersion().

Referenced by eq::Frame::setReady(), and syncReadback().

Here is the call graph for this function:

Here is the caller graph for this function:

bool eq::FrameData::isReady (  )  const [inline]

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

Definition at line 135 of file lib/client/frameData.h.

References eq::net::Object::getVersion().

Referenced by eq::Frame::isReady().

Here is the call graph for this function:

Here is the caller graph for this function:

void eq::FrameData::waitReady (  )  const [inline]

Wait for the frame data to become available.

Definition at line 138 of file lib/client/frameData.h.

References eq::net::Object::getVersion(), and eq::base::Monitor< T >::waitGE().

Referenced by eq::Frame::waitReady().

Here is the call graph for this function:

Here is the caller graph for this function:

void eq::FrameData::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 450 of file lib/client/frameData.cpp.

References eq::net::Object::getVersion(), eq::base::Lock::set(), and eq::base::Lock::unset().

Referenced by eq::Frame::addListener().

Here is the call graph for this function:

Here is the caller graph for this function:

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

Remove a frame listener.

Parameters:
listener the listener.

Definition at line 461 of file lib/client/frameData.cpp.

References eq::base::Lock::set(), and eq::base::Lock::unset().

Referenced by eq::Frame::removeListener().

Here is the call graph for this function:

Here is the caller graph for this function:

void eq::FrameData::disableBuffer ( const Frame::Buffer  buffer  )  [inline]

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

Parameters:
buffer the buffer to disable.

Definition at line 160 of file lib/client/frameData.h.

Referenced by eq::Frame::disableBuffer().

Here is the caller graph for this function:

void eq::FrameData::useSendToken ( const bool  use  )  [inline]

For internal use only.

Definition at line 164 of file lib/client/frameData.h.

Referenced by eq::Frame::useSendToken().

Here is the caller graph for this function:

void eq::FrameData::update ( const uint32_t  version  ) 

Warning:
internal use only.

Definition at line 81 of file lib/client/frameData.cpp.

References eq::net::Object::getInstanceID(), eq::net::Object::getLocalNode(), and eq::net::Object::send().

Referenced by eq::Node::getFrameData().

Here is the call graph for this function:

Here is the caller graph for this function:

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

Returns:
how the changes are to be handled.

Reimplemented from eq::net::Object.

Definition at line 171 of file lib/client/frameData.h.

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

void eq::FrameData::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 68 of file lib/client/frameData.cpp.

void eq::FrameData::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 74 of file lib/client/frameData.cpp.

References clear(), EQLOG, and eq::LOG_ASSEMBLY.

Here is the call graph for this function:

void eq::FrameData::attachToSession ( const uint32_t  id,
const uint32_t  instanceID,
net::Session session 
) [protected, virtual]

See also:
net::Object::attachToSession

Reimplemented from eq::net::Object.

Definition at line 90 of file lib/client/frameData.cpp.

References eq::net::Session::getCommandThreadQueue(), and eq::net::Dispatcher::registerCommand().

Here is the call graph for this function:


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