Visualization Library

A lightweight C++ OpenGL middleware for 2D/3D graphics
[Home] [Tutorials] [All Classes] [Grouped Classes]
Public Member Functions | Protected Member Functions | Protected Attributes

vl::ReadPixels Class Reference

A RenderEventCallback that copyes a rectangular pixel area from a source buffer to an Image at the end of a rendering. More...

#include <ReadPixels.hpp>

Inheritance diagram for vl::ReadPixels:
vl::RenderEventCallback vl::Object

List of all members.

Public Member Functions

virtual const char * className ()
 Returns the name of the class.
 ReadPixels ()
 ReadPixels (int x, int y, int width, int height, EReadDrawBuffer read_buffer, Image *image, bool store_in_pbo)
virtual bool onRenderingStarted (const RenderingAbstract *)
 Reimplement to react to this event.
virtual bool onRenderingFinished (const RenderingAbstract *)
 Reimplement to react to this event.
virtual bool onRendererStarted (const RendererAbstract *)
 Reimplement to react to this event.
virtual bool onRendererFinished (const RendererAbstract *)
 Reimplement to react to this event.
void setup (int x, int y, int width, int height, EReadDrawBuffer read_buffer, bool store_in_pbo)
void setX (int x)
void setY (int y)
void setWidth (int width)
void setHeight (int height)
void setReadBuffer (EReadDrawBuffer buffer)
void setImage (Image *image)
void setSavePath (const String &path)
int x () const
int y () const
int width () const
int height () const
EReadDrawBuffer readBuffer () const
Imageimage ()
const Imageimage () const
const StringsavePath () const
void setStoreInPixelBufferObject (bool use_pbo)
bool storeInPixelBufferObject () const

Protected Member Functions

void readPixels ()

Protected Attributes

int mX
int mY
int mWidth
int mHeight
EReadDrawBuffer mReadBuffer
ref< ImagemImage
String mSavePath
bool mStoreInPixelBufferObject

Detailed Description

A RenderEventCallback that copyes a rectangular pixel area from a source buffer to an Image at the end of a rendering.

The actual copy is performed using the function Image::readPixels(). Using the function setSavePath() the Image will be saved on the specified location.

See also:

Constructor & Destructor Documentation

vl::ReadPixels::ReadPixels (  ) [inline]
vl::ReadPixels::ReadPixels ( int  x,
int  y,
int  width,
int  height,
EReadDrawBuffer  read_buffer,
Image image,
bool  store_in_pbo 
) [inline]

Member Function Documentation

virtual const char* vl::ReadPixels::className (  ) [inline, virtual]

Returns the name of the class.

Reimplemented from vl::RenderEventCallback.

virtual bool vl::ReadPixels::onRenderingStarted ( const RenderingAbstract  ) [inline, virtual]

Reimplement to react to this event.

Returns:
true if the callback reacted to the given event.

Implements vl::RenderEventCallback.

virtual bool vl::ReadPixels::onRenderingFinished ( const RenderingAbstract  ) [inline, virtual]

Reimplement to react to this event.

Returns:
true if the callback reacted to the given event.

Implements vl::RenderEventCallback.

virtual bool vl::ReadPixels::onRendererStarted ( const RendererAbstract  ) [inline, virtual]

Reimplement to react to this event.

Returns:
true if the callback reacted to the given event.

Implements vl::RenderEventCallback.

virtual bool vl::ReadPixels::onRendererFinished ( const RendererAbstract  ) [inline, virtual]

Reimplement to react to this event.

Returns:
true if the callback reacted to the given event.

Implements vl::RenderEventCallback.

void vl::ReadPixels::setup ( int  x,
int  y,
int  width,
int  height,
EReadDrawBuffer  read_buffer,
bool  store_in_pbo 
) [inline]
void vl::ReadPixels::setX ( int  x ) [inline]
void vl::ReadPixels::setY ( int  y ) [inline]
void vl::ReadPixels::setWidth ( int  width ) [inline]
void vl::ReadPixels::setHeight ( int  height ) [inline]
void vl::ReadPixels::setReadBuffer ( EReadDrawBuffer  buffer ) [inline]
void vl::ReadPixels::setImage ( Image image ) [inline]
void vl::ReadPixels::setSavePath ( const String path ) [inline]
int vl::ReadPixels::x (  ) const [inline]
int vl::ReadPixels::y (  ) const [inline]
int vl::ReadPixels::width (  ) const [inline]
int vl::ReadPixels::height (  ) const [inline]
EReadDrawBuffer vl::ReadPixels::readBuffer (  ) const [inline]
Image* vl::ReadPixels::image (  ) [inline]
const Image* vl::ReadPixels::image (  ) const [inline]
const String& vl::ReadPixels::savePath (  ) const [inline]
void vl::ReadPixels::setStoreInPixelBufferObject ( bool  use_pbo ) [inline]
bool vl::ReadPixels::storeInPixelBufferObject (  ) const [inline]
void vl::ReadPixels::readPixels (  ) [inline, protected]

Member Data Documentation

int vl::ReadPixels::mX [protected]
int vl::ReadPixels::mY [protected]
int vl::ReadPixels::mWidth [protected]
int vl::ReadPixels::mHeight [protected]

The documentation for this class was generated from the following file:

Visualization Library v2010.11.1125 Reference Documentation
Copyright 2005-2009 Michele Bosi. All rights reserved.
Updated on Fri Nov 26 2010 10:33:51.
Permission is granted to use this page to write and publish articles regarding Visualization Library.