CS488 PA6
|
#include <FrameBuffer.h>
Inherited by PPMFrameBuffer, and SDLFrameBuffer.
Public Member Functions | |
virtual void | clear (const Color &color)=0 |
virtual int | getHeight () const =0 |
virtual int | getWidth () const =0 |
virtual void | setPixel (int x, int y, const Color &color)=0 |
virtual void | show ()=0 |
Protected Attributes | |
int | height |
int | width |
int | xMax |
int | xMin |
int | yMax |
int | yMin |
An encapsulation of a FrameBuffer that can be used to implement and test various 2D and 3D graphics algorithms.
A FrameBuffer uses traditional Euclidean coordinates, with the origin (0,0) at the center.
|
pure virtual |
Clear the FrameBuffer (i.e., set each pixel to the given Color).
color | The color to clear to |
Implemented in SDLFrameBuffer, and PPMFrameBuffer.
|
pure virtual |
Get the height of this FrameBuffer in pixels.
Implemented in SDLFrameBuffer, and PPMFrameBuffer.
|
pure virtual |
Get the width of this FrameBuffer in pixels.
Implemented in SDLFrameBuffer, and PPMFrameBuffer.
|
pure virtual |
Set a particular pixel to a particular color.
x | The horizontal coordinate of the pixel |
y | The vertical coordinate of the pixel |
color | The Color |
Implemented in SDLFrameBuffer, and PPMFrameBuffer.
|
pure virtual |
Show this FrameBuffer in the window.
Implemented in SDLFrameBuffer, and PPMFrameBuffer.
|
protected |
The height (in pixels).
|
protected |
The width (in pixels).
|
protected |
The largest horizontal index.
|
protected |
The smallest horizontal index.
|
protected |
The largest vertical index.
|
protected |
The smallest vertical index.