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

texture3d.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: texture3d_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 TEXTURE3D_H 00022 #define TEXTURE3D_H 00023 00024 #include "transparenttransformatable.h" 00025 //#include "object3d.h" 00026 #include "pigment3d.h" 00027 #include "finish.h" 00028 #include "texture.h" 00029 #include "colour.h" 00030 00036 class Texture3D: public TransparentTransformatable { 00037 00038 public: // Public members 00039 Pigment3D *pigment; 00040 Finish *finish; 00041 00042 public: // Constructors and destructor 00043 Texture3D(): pigment(0), finish(0) {} 00044 Texture3D(Pigment3D *p, Finish *f): pigment(p), finish(f) {} 00045 Texture3D(const Texture3D &t): TransparentTransformatable(t) { 00046 if (t.pigment) pigment = t.pigment->copy(); else pigment = 0; 00047 if (t.finish) finish = new Finish(*t.finish); else finish = 0; 00048 } 00049 00050 ~Texture3D() { 00051 delete(finish); 00052 delete(pigment); 00053 } 00054 00055 private: 00056 Texture3D& operator=(const Texture3D&); 00057 00058 public: // Public methods 00059 00062 void overlay(const Texture3D& t) { 00063 if (!pigment) pigment = t.pigment->copy(); 00064 if (!finish) finish = new Finish(*t.finish); 00065 } 00066 00069 Texture* evaluateAt(const Vector3 &p) const; 00070 00071 }; 00072 00073 00074 #endif

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