Visualization Library v1.0.3

A lightweight C++ OpenGL middleware for 2D/3D graphics

VL     Star     Watch     Fork     Issue

[Download] [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

 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:

Definition at line 152 of file ReadPixels.hpp.


Constructor & Destructor Documentation

vl::ReadPixels::ReadPixels (  ) [inline]

Definition at line 157 of file ReadPixels.hpp.

References VL_DEBUG_SET_OBJECT_NAME.

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

Definition at line 168 of file ReadPixels.hpp.

References VL_DEBUG_SET_OBJECT_NAME.


Member Function Documentation

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.

Definition at line 180 of file ReadPixels.hpp.

References readPixels().

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.

Definition at line 186 of file ReadPixels.hpp.

References readPixels().

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.

Definition at line 192 of file ReadPixels.hpp.

References readPixels().

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.

Definition at line 198 of file ReadPixels.hpp.

References readPixels().

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

Definition at line 204 of file ReadPixels.hpp.

References height(), mHeight, mReadBuffer, mStoreInPixelBufferObject, mWidth, mX, mY, width(), x(), and y().

void vl::ReadPixels::setX ( int  x ) [inline]

Definition at line 214 of file ReadPixels.hpp.

References mX, and x().

void vl::ReadPixels::setY ( int  y ) [inline]

Definition at line 215 of file ReadPixels.hpp.

References mY, and y().

void vl::ReadPixels::setWidth ( int  width ) [inline]

Definition at line 216 of file ReadPixels.hpp.

References mWidth, and width().

void vl::ReadPixels::setHeight ( int  height ) [inline]

Definition at line 217 of file ReadPixels.hpp.

References height(), and mHeight.

void vl::ReadPixels::setReadBuffer ( EReadDrawBuffer  buffer ) [inline]

Definition at line 218 of file ReadPixels.hpp.

References mReadBuffer.

void vl::ReadPixels::setImage ( Image image ) [inline]

Definition at line 219 of file ReadPixels.hpp.

References image(), and mImage.

void vl::ReadPixels::setSavePath ( const String path ) [inline]

Definition at line 220 of file ReadPixels.hpp.

References mSavePath.

int vl::ReadPixels::x (  ) const [inline]

Definition at line 222 of file ReadPixels.hpp.

References mX.

Referenced by setup(), and setX().

int vl::ReadPixels::y (  ) const [inline]

Definition at line 223 of file ReadPixels.hpp.

References mY.

Referenced by setup(), and setY().

int vl::ReadPixels::width (  ) const [inline]

Definition at line 224 of file ReadPixels.hpp.

References mWidth.

Referenced by setup(), and setWidth().

int vl::ReadPixels::height (  ) const [inline]

Definition at line 225 of file ReadPixels.hpp.

References mHeight.

Referenced by setHeight(), and setup().

EReadDrawBuffer vl::ReadPixels::readBuffer (  ) const [inline]

Definition at line 226 of file ReadPixels.hpp.

References mReadBuffer.

Image* vl::ReadPixels::image (  ) [inline]

Definition at line 227 of file ReadPixels.hpp.

References vl::ref< T >::get(), and mImage.

Referenced by setImage().

const Image* vl::ReadPixels::image (  ) const [inline]

Definition at line 228 of file ReadPixels.hpp.

References vl::ref< T >::get(), and mImage.

const String& vl::ReadPixels::savePath (  ) const [inline]

Definition at line 229 of file ReadPixels.hpp.

References mSavePath.

Referenced by readPixels().

void vl::ReadPixels::setStoreInPixelBufferObject ( bool  use_pbo ) [inline]

Definition at line 231 of file ReadPixels.hpp.

References mStoreInPixelBufferObject.

bool vl::ReadPixels::storeInPixelBufferObject (  ) const [inline]

Definition at line 232 of file ReadPixels.hpp.

References mStoreInPixelBufferObject.

Referenced by readPixels().

void vl::ReadPixels::readPixels (  ) [inline, protected]

Member Data Documentation

int vl::ReadPixels::mX [protected]

Definition at line 248 of file ReadPixels.hpp.

Referenced by readPixels(), setup(), setX(), and x().

int vl::ReadPixels::mY [protected]

Definition at line 249 of file ReadPixels.hpp.

Referenced by readPixels(), setup(), setY(), and y().

int vl::ReadPixels::mWidth [protected]

Definition at line 250 of file ReadPixels.hpp.

Referenced by readPixels(), setup(), setWidth(), and width().

int vl::ReadPixels::mHeight [protected]

Definition at line 251 of file ReadPixels.hpp.

Referenced by height(), readPixels(), setHeight(), and setup().

Definition at line 252 of file ReadPixels.hpp.

Referenced by readBuffer(), readPixels(), setReadBuffer(), and setup().

Definition at line 253 of file ReadPixels.hpp.

Referenced by image(), readPixels(), and setImage().

Definition at line 254 of file ReadPixels.hpp.

Referenced by savePath(), and setSavePath().

Definition at line 255 of file ReadPixels.hpp.

Referenced by setStoreInPixelBufferObject(), setup(), and storeInPixelBufferObject().


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

Visualization Library v1.0.3 Reference Documentation
Copyright Michele Bosi. All rights reserved.
Updated on Tue Feb 7 2017 00:55:11.
Permission is granted to use this page to write and publish articles regarding Visualization Library.