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

lightray.h

00001 /* ************************************************************************* 00002 lightray.h - description 00003 ------------------- 00004 begin : Wed Oct 16 2002 00005 copyright : (C) 2002 by Micha Riser 00006 email : mriser@gmx.net 00007 00008 $Id: lightray_8h-source.html,v 1.1 2005/02/04 21:02:26 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 LIGHTRAY_H 00022 #define LIGHTRAY_H 00023 00024 #include "ray.h" 00025 #include "colour.h" 00026 #include "insidelist.h" 00027 00028 class Scene; 00029 00033 class LightRay: public Ray { 00034 00035 public: // Constructor and destructor 00036 LightRay(const Vector3& start, const Vector3& end, Scene* s, 00037 const Colour lightcolour, const InsideList* l): 00038 Ray(start, Vector3::sub(end,start)), myscene(s), colour(lightcolour), 00039 inside(), length(direction.length()) { 00040 00041 direction.scale(1/length); 00042 if (l) inside = InsideList(*l); 00043 00044 } 00045 00046 LightRay(const LightRay& l): Ray(l), myscene(l.myscene), colour(l.colour), 00047 inside(l.inside), length(l.length) {} 00048 00049 ~LightRay() {} 00050 00051 private: 00052 LightRay& operator=(const LightRay&); 00053 00054 public: // Public methods 00058 Colour shoot(); 00059 00060 private: // Private attributes 00061 Scene* myscene; 00062 Colour colour; 00063 InsideList inside; 00064 DBL length; 00065 00066 }; 00067 00068 #endif

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