FrameBufferGLUT Class Reference

#include <FrameBufferGLUT.h>

Inheritance diagram for FrameBufferGLUT:

FrameBufferGL FrameBuffer GRAObject List of all members.

Public Member Functions

 FrameBufferGLUT (unsigned, char *, int, int)
 FrameBufferGLUT (unsigned, int, int, int, int, int)
virtual void showContent ()
int getID (void) const
virtual void setWidth (unsigned)
virtual void setHeight (unsigned)
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 &)
virtual unsigned getWidth () const
virtual unsigned getHeight () const

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

int _id
unsigned _width
unsigned _height
unsigned _fbMode

Detailed Description

Definition at line 13 of file FrameBufferGLUT.h.


Constructor & Destructor Documentation

FrameBufferGLUT unsigned  ,
char *  ,
int  ,
int 
 

Definition at line 12 of file FrameBufferGLUT.cc.

References FrameBuffer::_fbMode, FrameBufferGLUT::_id, FrameBuffer::FB_DEPTH, FrameBuffer::FB_DOUBLE, FrameBuffer::FB_INDEX, FrameBuffer::FB_RGBA, and FrameBuffer::FB_SINGLE.

FrameBufferGLUT unsigned  ,
int  ,
int  ,
int  ,
int  ,
int 
 

Definition at line 41 of file FrameBufferGLUT.cc.

References FrameBuffer::_fbMode, FrameBufferGLUT::_id, FrameBuffer::FB_DEPTH, FrameBuffer::FB_DOUBLE, FrameBuffer::FB_INDEX, FrameBuffer::FB_RGBA, and FrameBuffer::FB_SINGLE.


Member Function Documentation

void _sanitizeMode  )  [inline, protected, inherited]
 

Definition at line 32 of file FrameBuffer.h.

void clearColor const Color3f &   )  [virtual, inherited]
 

Sets all pixels to given color

= new color

Reimplemented from FrameBuffer.

Definition at line 249 of file FrameBufferGL.cc.

Color3f getColor unsigned  ,
unsigned 
const [virtual, inherited]
 

Returns the pixel's color.

This method is slow due to manipulation with OpenGL matrices. Use another frame-buffer for this task!

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

Reimplemented from FrameBuffer.

Definition at line 239 of file FrameBufferGL.cc.

virtual unsigned getHeight  )  const [inline, virtual, inherited]
 

Definition at line 81 of file FrameBuffer.h.

Referenced by RTRender::_render().

int getID void   )  const [inline]
 

Definition at line 45 of file FrameBufferGLUT.h.

virtual unsigned getWidth  )  const [inline, virtual, inherited]
 

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

Definition at line 80 of file FrameBuffer.h.

Referenced by RTRender::_render().

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

Reimplemented from FrameBuffer.

Definition at line 59 of file FrameBufferGL.cc.

References FrameBuffer::_height, FrameBuffer::_width, Projection::getBottomPlane(), Projection::getLeftPlane(), Projection::getPlaneHeight(), Projection::getPlaneWidth(), and Camera::getProjection().

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

Sets the pixel's color.

This method is slow due to manipulation with OpenGL matrices. Use another frame-buffer for this task!

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

Reimplemented from FrameBuffer.

Definition at line 22 of file FrameBufferGL.cc.

References FrameBuffer::_height, FrameBuffer::_width, Projection::getBottomPlane(), Projection::getLeftPlane(), Projection::getPlaneHeight(), Projection::getPlaneWidth(), and Camera::getProjection().

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

Reimplemented from FrameBuffer.

Definition at line 126 of file FrameBufferGL.cc.

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

Sets color of many pixels. Setting color pixel by pixel is usually too slow. We can therefore write more pixels at once. 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 from FrameBuffer.

Definition at line 115 of file FrameBufferGL.cc.

void setHeight unsigned   )  [virtual, inherited]
 

Reimplemented from FrameBuffer.

Definition at line 14 of file FrameBufferGL.cc.

References FrameBuffer::setHeight().

void setWidth unsigned   )  [virtual, inherited]
 

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

Reimplemented from FrameBuffer.

Definition at line 6 of file FrameBufferGL.cc.

References FrameBuffer::setWidth().

void showContent  )  [virtual]
 

This method should be called after all pixels have been colorized by the setPixel() method in order to show the picture on screen

Reimplemented from FrameBufferGL.

Definition at line 71 of file FrameBufferGLUT.cc.

References FrameBuffer::_fbMode, and FrameBuffer::FB_DOUBLE.


Member Data Documentation

unsigned _fbMode [protected, inherited]
 

Definition at line 22 of file FrameBuffer.h.

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

unsigned _height [protected, inherited]
 

Definition at line 21 of file FrameBuffer.h.

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

int _id [protected]
 

Definition at line 15 of file FrameBufferGLUT.h.

Referenced by FrameBufferGLUT::FrameBufferGLUT().

unsigned _width [protected, inherited]
 

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, inherited]
 

Definition at line 29 of file FrameBuffer.h.

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

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

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, inherited]
 

Definition at line 26 of file FrameBuffer.h.

Referenced by FrameBufferGLUT::FrameBufferGLUT().

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

Definition at line 25 of file FrameBuffer.h.

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

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

Definition at line 27 of file FrameBuffer.h.

Referenced by FrameBufferGLUT::FrameBufferGLUT().


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