00001 /* ************************************************************************* 00002 lightsource.h - description 00003 ------------------- 00004 begin : Wed Oct 16 2002 00005 copyright : (C) 2002 by Micha Riser 00006 email : mriser@gmx.net 00007 00008 $Id: lightsource_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 LIGHTSOURCE_H 00022 #define LIGHTSOURCE_H 00023 00024 #include "transparenttransformatable.h" 00025 #include "vector.h" 00026 #include "lightray.h" 00027 #include "colour.h" 00028 #include "cameraray.h" 00029 00033 class LightSource : public TransparentTransformatable { 00034 00035 public: // Constructors and destructor 00036 LightSource(const Vector3& loc): TransparentTransformatable(loc) {} 00037 00038 public: // Public methods 00041 Vector3 location() const {return getTranslation();} 00042 00046 bool operator<(const LightSource& l) {return this<&l;} 00047 00048 // Pure virtual methods 00049 virtual LightRay shineTo(const Vector3& to, InsideList* l) const = 0; 00050 virtual Colour enlight(const CameraRay& cray, const Texture* t, InsideList* l) const = 0; 00051 00052 }; 00053 00054 #endif
1.3.8