Drawable.hh

00001 /**********************************************************************
00002  * blaRAY -- photon mapper/raytracer
00003  * (C) 2008 by Tomasz bla Fortuna <bla@thera.be>, <bla@af.gliwice.pl>
00004  *
00005  * This program is free software: you can redistribute it and/or modify
00006  * it under the terms of the GNU General Public License as published by
00007  * the Free Software Foundation, either version 3 of the License, or
00008  * any later version.
00009  *
00010  * See Docs/LICENSE
00011  *********************/
00012 
00013 #ifndef _DRAWABLE_H_
00014 #define _DRAWABLE_H_
00015 
00016 #include <string.h>
00017 #include "General/Types.hh"
00018 #include "World/Color.hh"
00019 
00020 namespace Graphics {
00021 
00023         class Drawable {
00024         protected:
00026                 const Int Width, Height;
00029         public:
00031                 inline Drawable(Int Width, Int Height)
00032                         : Width(Width), Height(Height) {}
00033 
00035                 virtual ~Drawable() {};
00036 
00038                 virtual Int GetWidth() const {
00039                         return this->Width;
00040                 }
00041 
00043                 virtual Int GetHeight() const {
00044                         return this->Height;
00045                 }
00046 
00048                 virtual void PutPixel(Int x, Int y, const World::Color &C) = 0;
00049 
00051                 virtual void Refresh() = 0;
00052 
00054                 virtual void Save(const std::string Filename) const = 0;
00055         };
00056 };
00057 
00058 #endif

Generated on Wed Mar 12 00:34:58 2008 for blaRAY by  doxygen 1.5.5