00001 /* ************************************************************************* 00002 pointlight.h - description 00003 ------------------- 00004 begin : Wed Oct 16 2002 00005 copyright : (C) 2002 by Micha Riser 00006 email : mriser@gmx.net 00007 00008 $Id: pointlight_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 POINTLIGHT_H 00022 #define POINTLIGHT_H 00023 00024 #include "lightsource.h" 00025 #include "lightcache.h" 00026 00031 class PointLight: public LightSource { 00032 00033 public: // Constructors and destructor 00034 PointLight(const Vector3& location, const Colour& col, Scene* s, bool do_fading=false): // *change me* default to true 00035 LightSource(location), c(col), scene(s), fading(do_fading) {} 00036 00037 ~PointLight() {} 00038 00039 public: // Public methods 00040 00041 // Inherited by LightSource 00042 LightRay shineTo(const Vector3& to, InsideList* l) const; 00043 Colour enlight(const CameraRay& cray, const Texture* t, InsideList* l) const; 00044 00045 private: // Private attributes 00046 Colour c; 00047 Scene* scene; 00048 bool fading; 00049 00050 }; 00051 00052 #endif
1.3.8