Google

Main Page   Class Hierarchy   Compound List   File List   Compound Members  

light.h

00001 /*
00002     Copyright (C) 2000-2001 by Jorrit Tyberghein
00003     Copyright (C) 1999 by Andrew Zabolotny <bit@eltech.ru>
00004 
00005     This library is free software; you can redistribute it and/or
00006     modify it under the terms of the GNU Library General Public
00007     License as published by the Free Software Foundation; either
00008     version 2 of the License, or (at your option) any later version.
00009 
00010     This library is distributed in the hope that it will be useful,
00011     but WITHOUT ANY WARRANTY; without even the implied warranty of
00012     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013     Library General Public License for more details.
00014 
00015     You should have received a copy of the GNU Library General Public
00016     License along with this library; if not, write to the Free
00017     Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00018 */
00019 
00020 #ifndef __IENGINE_LIGHT_H__
00021 #define __IENGINE_LIGHT_H__
00022 
00023 #include "csutil/scf.h"
00024 #include "iengine/fview.h"
00025 
00026 class csLight;
00027 class csColor;
00028 struct iSector;
00029 struct iObject;
00030 struct iCrossHalo;
00031 struct iNovaHalo;
00032 struct iFlareHalo;
00033 
00035 #define CS_DEFAULT_LIGHT_LEVEL 20
00036 
00037 #define CS_NORMAL_LIGHT_LEVEL 128
00038 
00049 #define CS_ATTN_NONE      0
00050 #define CS_ATTN_LINEAR    1
00051 #define CS_ATTN_INVERSE   2
00052 #define CS_ATTN_REALISTIC 3
00053 
00054 SCF_VERSION (iLight, 0, 0, 6);
00055 
00059 struct iLight : public iBase
00060 {
00062   virtual csLight* GetPrivateObject () = 0;
00063 
00065   virtual unsigned long GetLightID () = 0;
00066 
00068   virtual iObject *QueryObject() = 0;
00069 
00071   virtual const csVector3& GetCenter () = 0;
00073   virtual void SetCenter (const csVector3& pos) = 0;
00074 
00076   virtual iSector *GetSector () = 0;
00078   virtual void SetSector (iSector* sector) = 0;
00079 
00081   virtual float GetRadius () = 0;
00083   virtual float GetSquaredRadius () = 0;
00085   virtual float GetInverseRadius () = 0;
00087   virtual void SetRadius (float r) = 0;
00088 
00090   virtual const csColor& GetColor () = 0;
00092   virtual void SetColor (const csColor& col) = 0;
00093 
00095   virtual int GetAttenuation () = 0;
00106   virtual void SetAttenuation (int a) = 0;
00107 
00109   virtual iCrossHalo* CreateCrossHalo (float intensity, float cross) = 0;
00111   virtual iNovaHalo* CreateNovaHalo (int seed, int num_spokes,
00112         float roundness) = 0;
00114   virtual iFlareHalo* CreateFlareHalo () = 0;
00115 
00117   virtual float GetBrightnessAtDistance (float d) = 0;
00118 };
00119 
00120 SCF_VERSION (iLightList, 0, 0, 1);
00121 
00125 struct iLightList : public iBase
00126 {
00128   virtual int GetCount () const = 0;
00129 
00131   virtual iLight *Get (int n) const = 0;
00132 
00134   virtual int Add (iLight *obj) = 0;
00135 
00137   virtual bool Remove (iLight *obj) = 0;
00138 
00140   virtual bool Remove (int n) = 0;
00141 
00143   virtual void RemoveAll () = 0;
00144 
00146   virtual int Find (iLight *obj) const = 0;
00147 
00149   virtual iLight *FindByName (const char *Name) const = 0;
00150 
00152   virtual iLight *FindByID (unsigned long id) const = 0;
00153 };
00154 
00155 SCF_VERSION (iLightingProcessInfo, 0, 0, 1);
00156 
00163 struct iLightingProcessInfo : public iFrustumViewUserdata
00164 {
00166   virtual iLight* GetLight () const = 0;
00167 
00169   virtual bool GetGouraudOnly () const = 0;
00170 
00172   virtual bool IsDynamic () const = 0;
00173 
00175   virtual void SetColor (const csColor& col) = 0;
00176 
00178   virtual const csColor& GetColor () const = 0;
00179 };
00180 
00181 #endif // __IENGINE_LIGHT_H__
00182 

Generated for Crystal Space by doxygen 1.2.5 written by Dimitri van Heesch, ©1997-2000