Main Page | Class Hierarchy | Class List | File List | Class Members

texture.h

00001 /* ************************************************************************* 00002 texture.h - description 00003 ------------------- 00004 begin : Wed Oct 16 2002 00005 copyright : (C) 2002 by Micha Riser 00006 email : mriser@gmx.net 00007 00008 $Id: texture_8h-source.html,v 1.1 2005/02/04 21:02:27 micha Exp $ 00009 00010 ************************************************************************* */ 00011 00012 /* ************************************************************************* 00013 * * 00014 * This program is free software; you can redistribute it and/or modify * 00015 * it under the terms of the GNU General Public License as published by * 00016 * the Free Software Foundation; either version 2 of the License, or * 00017 * (at your option) any later version. * 00018 * * 00019 ************************************************************************* */ 00020 00021 #ifndef TEXTURE_H 00022 #define TEXTURE_H 00023 00024 #include "colour.h" 00025 #include "finish.h" 00026 #include "lightray.h" 00027 00028 class CameraRay; 00029 00034 class Texture { 00035 00036 public: // Public attributes 00037 ColourA* colour; 00038 const Finish* finish; 00039 00040 public: // Constructors and destructor 00041 Texture(ColourA *c, const Finish *f): colour(c), finish(f) {} 00042 00043 ~Texture() { 00044 delete(colour); 00045 } 00046 00047 private: // Private constructor 00048 Texture(const Texture& t); 00049 Texture& operator=(const Texture&); 00050 00051 public: // Public methods 00052 00053 void setColour(ColourA* c) {/* check for existing colour? */ if (c) colour = new ColourA(*c);} 00054 void setFinish(const Finish* f) {finish = f;} 00055 00056 Colour enlightShadow(const CameraRay &cray) const; 00057 Colour enlightLight(LightRay& lray, const CameraRay& cray) const; 00058 00059 }; 00060 00061 #endif

Generated on Thu Jan 27 12:16:06 2005 for raytracer.kdevelop by doxygen 1.3.8