image_drawable_zbuffer.hpp

Go to the documentation of this file.
00001 /*
00002 **    TP 4ETI CPE Lyon
00003 **    Copyright (C) 2011 Damien Rohmer
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 **    (at your option) any later version.
00009 **
00010 **   This program is distributed in the hope that it will be useful,
00011 **    but WITHOUT ANY WARRANTY; without even the implied warranty of
00012 **    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013 **    GNU General Public License for more details.
00014 **
00015 **    You should have received a copy of the GNU General Public License
00016 **    along with this program.  If not, see <http://www.gnu.org/licenses/>.
00017 */
00018 
00019 
00020 
00021 #ifndef _IMAGE_DRAWABLE_ZBUFFER_HPP_
00022 #define _IMAGE_DRAWABLE_ZBUFFER_HPP_
00023 
00024 #include <image_drawable.hpp>
00025 
00026 namespace cpe
00027 {
00029     class image_drawable_zbuffer : public image_drawable
00030     {
00031     public:
00032 
00033         // ********************************************* //
00034         // ********************************************* //
00035         //  CONSTRUCTORS
00036         // ********************************************* //
00037         // ********************************************* //
00038 
00040         image_drawable_zbuffer();
00044         image_drawable_zbuffer(const unsigned int& N);
00049         image_drawable_zbuffer(const unsigned int& Nx,const unsigned int& Ny);
00053         image_drawable_zbuffer(const std::string& filename);
00054 
00055 
00056 
00057         // ********************************************* //
00058         // ********************************************* //
00059         //  DRAWING FUNCTIONS
00060         // ********************************************* //
00061         // ********************************************* //
00062 
00068         void line(const p2d& u1,const p2d& u2,const color& c1,const color& c2,const double& z1,const double& z2);
00069 
00075         void triangle(const p2d& u1,const p2d& u2,const p2d& u3,const color& c1,const color& c2,const color& c3,const double& z1,const double& z2,const double& z3);
00076 
00077     private:
00078 
00079         // ********************************************* //
00080         // ********************************************* //
00081         //  INTERNAL STORAGE
00082         // ********************************************* //
00083         // ********************************************* //
00084 
00089         std::vector<double> internal_Zbuffer;
00090 
00091     };
00092 }
00093 
00094 #endif
Generated on Mon Apr 18 20:43:30 2011 by  doxygen 1.6.3