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 DEFAULT_LIGHT_LEVEL 20
00036 
00037 #define 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;
00097   virtual void SetAttenuation (int a) = 0;
00098 
00100   virtual iCrossHalo* CreateCrossHalo (float intensity, float cross) = 0;
00102   virtual iNovaHalo* CreateNovaHalo (int seed, int num_spokes,
00103         float roundness) = 0;
00105   virtual iFlareHalo* CreateFlareHalo () = 0;
00106 
00108   virtual float GetBrightnessAtDistance (float d) = 0;
00109 };
00110 
00111 SCF_VERSION (iLightList, 0, 0, 1);
00112 
00113 struct iLightList : public iBase
00114 {
00116   virtual int GetCount () const = 0;
00117 
00119   virtual iLight *Get (int n) const = 0;
00120 
00122   virtual int Add (iLight *obj) = 0;
00123 
00125   virtual bool Remove (iLight *obj) = 0;
00126 
00128   virtual bool Remove (int n) = 0;
00129 
00131   virtual void RemoveAll () = 0;
00132 
00134   virtual int Find (iLight *obj) const = 0;
00135 
00137   virtual iLight *FindByName (const char *Name) const = 0;
00138 };
00139 
00140 SCF_VERSION (iLightingProcessInfo, 0, 0, 1);
00141 
00148 struct iLightingProcessInfo : public iFrustumViewUserdata
00149 {
00151   virtual iLight* GetLight () const = 0;
00152 
00154   virtual bool GetGouraudOnly () const = 0;
00155 
00157   virtual bool IsDynamic () const = 0;
00158 
00160   virtual void SetColor (const csColor& col) = 0;
00161 
00163   virtual const csColor& GetColor () const = 0;
00164 };
00165 
00166 #endif // __IENGINE_LIGHT_H__
00167 

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