light.h

00001 /*--License:
00002         Lilith 3D Engine
00003         Copyright Lee Thomason (Grinning Lizard Software) 2002-2003
00004         www.grinninglizard.com/lilith
00005 
00006         This program is free software; you can redistribute it and/or
00007         modify it under the terms of the GNU General Public License
00008         as published by the Free Software Foundation; either version 2
00009         of the License, or (at your option) any later version.
00010 
00011         This program is distributed in the hope that it will be useful,
00012         but WITHOUT ANY WARRANTY; without even the implied warranty of
00013         MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014         GNU General Public License for more details.
00015 
00016         You should have received a copy of the GNU General Public License
00017         along with this program; if not, write to the Free Software
00018         Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00019 
00020         The full text of the license can be found in license.txt
00021 */
00022 #ifndef LILITH3D_LIGHT_INCLUDED
00023 #define LILITH3D_LIGHT_INCLUDED
00024 
00025 #include "../grinliz/glcolor.h"
00026 #include "../grinliz/glvector.h"
00027 #include "../grinliz/glrectangle.h"
00028 #include "../grinliz/glinnercircle.h"
00029 
00030 namespace lilith3d
00031 {
00032 
00033 /* Define a point light.
00034 
00035         A point light illuminates the terrain around the light. PointLights
00036         have a position and radius of illumination. 
00037 
00038         Once a light is new'd it will appear in the world until it is deleted.
00039 
00040         Lights are owned by the game, not the engine. The game is responsible
00041         for creating and later deleting the light. The exception is the
00042         FadeOutAndDelete() method which will fade the light and clean it up.
00043 
00044         @todo   Lights should illuminate Meshes.
00045         @todo   Consider that lights should be a Mesh
00046 */
00047 
00048 //class PointLight
00049 //{
00050 //  public:
00051 //      /// Create a point light.
00052 //      PointLight(     float x, float y, float z, float radius, const grinliz::Color3F& color );
00053 //      virtual ~PointLight();
00054 //
00055 //      /// The current location of the light.
00056 //      const grinliz::Vector3F& Origin() const         {       return origin; }
00057 //      /// The size of the light.
00058 //      float Radius() const                            {       return radius; }
00059 //      /// The bounding box of the light.
00060 //      const grinliz::Rectangle3F&     AABB() const            {       return bounds; }
00061 //
00062 //      /** Sets the x, y, and z position of the light. Will take effect
00063 //              at the next DoTick()
00064 //      */
00065 //      void SetPos( float x, float y, float z );
00066 //
00067 //      /// Change the color of the light.
00068 //      void SetColor( const grinliz::Color3F& color );
00069 //
00070 //      virtual void DoTick();
00071 //      virtual bool Done();
00072 //      bool EngineDelete()             { return (fadeRate > 0.0f); }
00073 //
00074 //      /// Returns the color of the light computed at the last "DoTick"
00075 //      const grinliz::Color3F& Color() const           {       return currentColor; }
00076 //      /** Set the light to fade to black. After calling this the engine may
00077 //              delete the light so be sure to throw away the pointer to the light.
00078 //      */
00079 //      void FadeOutAndDelete( float rate = 1.0f )      {       fadeRate = rate; }
00080 //
00081 //  private:
00082 //      grinliz::InnerCircle<PointLight>        innerNode;
00083 //      grinliz::Vector3F               origin;
00084 //      float                                   radius;
00085 //      grinliz::Rectangle3F    bounds;
00086 //      grinliz::Color3F                color;  
00087 //      grinliz::Color3F                currentColor;
00088 //      float                                   intensity;
00089 //      float                                   fadeRate;
00090 //};
00091 };      // namespace lilith3d
00092 
00093 #endif

Generated on Fri Mar 23 19:36:22 2007 for Lilith3D by  doxygen 1.5.1-p1