home *** CD-ROM | disk | FTP | other *** search
/ PC World 2006 July & August / PCWorld_2006-07-08_cd.bin / temacd / planearcade / planearcade.exe / Tank3.bmp / light.h < prev    next >
C/C++ Source or Header  |  2002-10-29  |  1KB  |  71 lines

  1.  
  2. #ifndef _LIGHT_H_
  3. #define _LIGHT_H_
  4.  
  5. //----------------------------
  6. //Light
  7. //----------------------------
  8. struct LIGHT
  9. {
  10.     D3DLIGHTTYPE Type; //typ svetla
  11.  
  12.     VECTOR3D Pos;    //pozicia
  13.     VECTOR3D Dir;    //smer natocenia
  14.  
  15.     COLOR Diffuse;     //farba
  16.     COLOR Ambient;     //farba
  17.     COLOR Specular;     //farba
  18.  
  19.     float Range;     //dosah
  20.     float Atten0;     //linearne zoslabenie
  21.  
  22.     bool Active;
  23.  
  24. };
  25.  
  26. //------------------------------------------------------------------
  27. // Name: LIGHTMANAGER class
  28. // Desc: ******************
  29. //------------------------------------------------------------------
  30.  
  31. class LIGHTMANAGER
  32. {
  33. private:
  34.  
  35. public:
  36.  
  37.     //konstruktor
  38.     LIGHTMANAGER();
  39.  
  40.     //destruktor
  41.     ~LIGHTMANAGER();
  42.  
  43.     //zasobniky
  44.     LIGHT *Light;  //zasobnik svetil moja struktura
  45.     D3DLIGHT9 *D3DLight; //zasobnik svetiel D3D
  46.  
  47.     int NumLights;  //pocet svetiel
  48.  
  49.     //
  50.     //FUNCKIE
  51.     //
  52.  
  53.     void Initialize(int NLights);
  54.     void CleanUp();
  55.  
  56.  
  57.     void RefreshLights();
  58.     void AddLightPoint(VECTOR3D Pos,COLOR Diffuse,
  59.                                     COLOR Ambient,
  60.                                     COLOR Specular,
  61.                                     float Atten,float Range);
  62.  
  63.     void AddLightDir(VECTOR3D Dir,COLOR Diffuse,
  64.                                   COLOR Ambient,
  65.                                   COLOR Specular);
  66.  
  67.  
  68. };
  69.  
  70.  
  71. #endif //_LIGHT_H_