00001 /* ************************************************************************* 00002 interior.h - description 00003 ------------------- 00004 begin : Wed Oct 15 2002 00005 copyright : (C) 2002 by Micha Riser 00006 email : mriser@gmx.net 00007 00008 $Id: raytracer_2interior_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 INTERIOR_H 00022 #define INTERIOR_H 00023 00024 #include "types.h" 00025 //#include "object3d.h" 00026 #include "media3d.h" 00027 00033 class Interior { 00034 00035 public: // Public attributes 00036 FLT ior; 00037 Media3D* media; 00038 00039 public: // Constructors and destructor 00040 00043 Interior(): ior(1), media(0) {} 00044 00049 Interior(FLT i, Media3D* m): ior(i), media(m) {} 00050 00053 Interior(const Interior &i): ior(i.ior) { 00054 if (i.media) media = i.media->copy(); else media = 0; 00055 } 00056 00057 ~Interior() { 00058 delete(media); 00059 } 00060 00061 private: 00062 Interior& operator=(const Interior&); 00063 00064 public: // Public methods 00065 00068 void overlay(const Interior &i) { 00069 if ( !media && i.media ) media = i.media->copy(); 00070 } 00071 00072 }; 00073 00074 #endif
1.3.8