FrameBuffer Class Reference

#include <FrameBuffer.h>

Inheritance diagram for FrameBuffer:

GRAObject FrameBufferGL FrameBufferGLX FrameBufferGLUT List of all members.

Public Member Functions

 FrameBuffer (unsigned mode)
 FrameBuffer (unsigned width, unsigned height, unsigned mode)
virtual ~FrameBuffer ()
virtual void showContent ()
virtual unsigned getWidth () const
virtual unsigned getHeight () const
virtual void setWidth (unsigned w)
virtual void setHeight (unsigned h)
virtual void setColor (const Camera &, unsigned, unsigned, float, const Color3f &)
virtual void setColor (const Camera &, unsigned, unsigned, const Color3f &)
virtual void setColors (const Camera &, unsigned, unsigned, float, const Color3f[], unsigned)
virtual void setColors (const Camera &, unsigned, unsigned, const Color3f[], unsigned)
virtual Color3f getColor (unsigned, unsigned) const
virtual void clearColor (const Color3f &)

Static Public Attributes

static const unsigned FB_RGBA = (1 << 0)
static const unsigned FB_INDEX = (1 << 1)
static const unsigned FB_SINGLE = (1 << 2)
static const unsigned FB_DOUBLE = (1 << 3)
static const unsigned FB_DEPTH = (1 << 4)

Protected Member Functions

void _sanitizeMode ()

Protected Attributes

unsigned _width
unsigned _height
unsigned _fbMode

Detailed Description

Definition at line 18 of file FrameBuffer.h.


Constructor & Destructor Documentation

FrameBuffer unsigned  mode  )  [inline]
 

Constructor

= frame-buffer mode

Definition at line 48 of file FrameBuffer.h.

FrameBuffer unsigned  width,
unsigned  height,
unsigned  mode
[inline]
 

Constructor

= width in pixels = height in pixels = frame-buffer mode

Definition at line 60 of file FrameBuffer.h.

virtual ~FrameBuffer  )  [inline, virtual]
 

Destructor

Definition at line 69 of file FrameBuffer.h.


Member Function Documentation

void _sanitizeMode  )  [inline, protected]
 

Definition at line 32 of file FrameBuffer.h.

virtual void clearColor const Color3f &   )  [inline, virtual]
 

Sets all pixels to given color

= new color

Reimplemented in FrameBufferGL, and FrameBufferGLX.

Definition at line 149 of file FrameBuffer.h.

Referenced by GLIrradCacheRender::_render().

virtual Color3f getColor unsigned  ,
unsigned 
const [inline, virtual]
 

Returns the pixel's color

= pixel x position, 0 = left = pixel y position, 0 = bottom = color of the pixel

Reimplemented in FrameBufferGL, and FrameBufferGLX.

Definition at line 138 of file FrameBuffer.h.

virtual unsigned getHeight  )  const [inline, virtual]
 

Definition at line 81 of file FrameBuffer.h.

Referenced by RTRender::_render().

virtual unsigned getWidth  )  const [inline, virtual]
 

Manipulation with frame-buffer's width and height (in pixels)

Definition at line 80 of file FrameBuffer.h.

Referenced by RTRender::_render().

virtual void setColor const Camera ,
unsigned  ,
unsigned  ,
const Color3f & 
[inline, virtual]
 

Reimplemented in FrameBufferGL, and FrameBufferGLX.

Definition at line 100 of file FrameBuffer.h.

virtual void setColor const Camera ,
unsigned  ,
unsigned  ,
float  ,
const Color3f & 
[inline, virtual]
 

Sets the pixel's color

= camera that made the snapshot = pixel x position, 0 = left = pixel y position, 0 = bottom = "depth" of pixel = new color of the pixel

Reimplemented in FrameBufferGL, and FrameBufferGLX.

Definition at line 94 of file FrameBuffer.h.

Referenced by RTRender::_render().

virtual void setColors const Camera ,
unsigned  ,
unsigned  ,
const   Color3f[],
unsigned 
[inline, virtual]
 

Reimplemented in FrameBufferGL, and FrameBufferGLX.

Definition at line 125 of file FrameBuffer.h.

virtual void setColors const Camera ,
unsigned  ,
unsigned  ,
float  ,
const   Color3f[],
unsigned 
[inline, virtual]
 

Sets color of many pixels. Setting color pixel by pixel is usually too slow. We can therefore write more pixels together. Pixels are written by lines starting at given pixel.

= camera that made the snapshot = position x of the first pixel, 0 = left = position y of the first pixel, 0 = bottom = "depth" of pixel = array of new pixel colors = number of pixels

Reimplemented in FrameBufferGL, and FrameBufferGLX.

Definition at line 118 of file FrameBuffer.h.

virtual void setHeight unsigned  h  )  [inline, virtual]
 

Reimplemented in FrameBufferGL, and FrameBufferGLX.

Definition at line 83 of file FrameBuffer.h.

Referenced by FrameBufferGL::setHeight().

virtual void setWidth unsigned  w  )  [inline, virtual]
 

Reimplemented in FrameBufferGL, and FrameBufferGLX.

Definition at line 82 of file FrameBuffer.h.

Referenced by FrameBufferGL::setWidth().

virtual void showContent  )  [inline, virtual]
 

Force to show the frame-buffer content on the screen. This method should be called after setColor() and setColors().

Reimplemented in FrameBufferGL, FrameBufferGLUT, and FrameBufferGLX.

Definition at line 75 of file FrameBuffer.h.


Member Data Documentation

unsigned _fbMode [protected]
 

Definition at line 22 of file FrameBuffer.h.

Referenced by FrameBufferGLX::_init(), FrameBufferGLX::clearColor(), FrameBufferGLUT::FrameBufferGLUT(), FrameBufferGLX::showContent(), and FrameBufferGLUT::showContent().

unsigned _height [protected]
 

Definition at line 21 of file FrameBuffer.h.

Referenced by FrameBufferGLX::_init(), FrameBufferGLX::getColor(), FrameBufferGLX::setColor(), FrameBufferGL::setColor(), FrameBufferGLX::setHeight(), and FrameBufferGLX::setWidth().

unsigned _width [protected]
 

Definition at line 20 of file FrameBuffer.h.

Referenced by FrameBufferGLX::_init(), FrameBufferGL::setColor(), FrameBufferGLX::setColors(), FrameBufferGLX::setHeight(), and FrameBufferGLX::setWidth().

const unsigned FB_DEPTH = (1 << 4) [static]
 

Definition at line 29 of file FrameBuffer.h.

Referenced by FrameBufferGLX::_init(), and FrameBufferGLUT::FrameBufferGLUT().

const unsigned FB_DOUBLE = (1 << 3) [static]
 

Definition at line 28 of file FrameBuffer.h.

Referenced by FrameBufferGLX::_init(), FrameBufferGLX::clearColor(), FrameBufferGLUT::FrameBufferGLUT(), FrameBufferGLX::showContent(), and FrameBufferGLUT::showContent().

const unsigned FB_INDEX = (1 << 1) [static]
 

Definition at line 26 of file FrameBuffer.h.

Referenced by FrameBufferGLUT::FrameBufferGLUT().

const unsigned FB_RGBA = (1 << 0) [static]
 

Definition at line 25 of file FrameBuffer.h.

Referenced by FrameBufferGLX::_init(), and FrameBufferGLUT::FrameBufferGLUT().

const unsigned FB_SINGLE = (1 << 2) [static]
 

Definition at line 27 of file FrameBuffer.h.

Referenced by FrameBufferGLUT::FrameBufferGLUT().


The documentation for this class was generated from the following file:
Generated on Tue Nov 21 15:11:43 2006 for gra by  doxygen 1.4.6