2014-02-16 14:32:28 +00:00
|
|
|
#ifndef __LIGHT_H_INCLUDED__
|
|
|
|
#define __LIGHT_H_INCLUDED__
|
|
|
|
|
2015-06-02 20:25:50 +00:00
|
|
|
#include "camera.h"
|
|
|
|
|
2015-06-03 12:29:34 +00:00
|
|
|
class Light {
|
2014-02-16 14:32:28 +00:00
|
|
|
private:
|
2015-06-03 12:29:34 +00:00
|
|
|
float position[4];
|
|
|
|
float diffuse[4];
|
|
|
|
float specular[4];
|
|
|
|
float attenuation[3];
|
|
|
|
bool enabled;
|
|
|
|
int glnum;
|
2014-02-16 14:32:28 +00:00
|
|
|
|
|
|
|
public:
|
2015-06-03 12:29:34 +00:00
|
|
|
// Creates DISABLED light
|
|
|
|
Light(void);
|
2014-02-16 14:32:28 +00:00
|
|
|
|
2015-06-03 12:29:34 +00:00
|
|
|
void setPosition(float x, float y, float z);
|
|
|
|
void setDirection(float x, float y, float z);
|
|
|
|
void setColor(float red, float green, float blue);
|
|
|
|
void setSpecular(float red, float green, float blue);
|
|
|
|
void setAttenuation(float constant, float linear, float quadratic);
|
|
|
|
void setEnabled(bool enabled);
|
|
|
|
void glUpdate(void);
|
2015-06-02 20:25:50 +00:00
|
|
|
void createFlare(Camera *camera);
|
2014-02-16 14:32:28 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
void updateLights(void);
|
|
|
|
|
|
|
|
#endif
|