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 >
Wrap
C/C++ Source or Header
|
2002-10-29
|
1KB
|
71 lines
#ifndef _LIGHT_H_
#define _LIGHT_H_
//----------------------------
//Light
//----------------------------
struct LIGHT
{
D3DLIGHTTYPE Type; //typ svetla
VECTOR3D Pos; //pozicia
VECTOR3D Dir; //smer natocenia
COLOR Diffuse; //farba
COLOR Ambient; //farba
COLOR Specular; //farba
float Range; //dosah
float Atten0; //linearne zoslabenie
bool Active;
};
//------------------------------------------------------------------
// Name: LIGHTMANAGER class
// Desc: ******************
//------------------------------------------------------------------
class LIGHTMANAGER
{
private:
public:
//konstruktor
LIGHTMANAGER();
//destruktor
~LIGHTMANAGER();
//zasobniky
LIGHT *Light; //zasobnik svetil moja struktura
D3DLIGHT9 *D3DLight; //zasobnik svetiel D3D
int NumLights; //pocet svetiel
//
//FUNCKIE
//
void Initialize(int NLights);
void CleanUp();
void RefreshLights();
void AddLightPoint(VECTOR3D Pos,COLOR Diffuse,
COLOR Ambient,
COLOR Specular,
float Atten,float Range);
void AddLightDir(VECTOR3D Dir,COLOR Diffuse,
COLOR Ambient,
COLOR Specular);
};
#endif //_LIGHT_H_