-
Notifications
You must be signed in to change notification settings - Fork 1
/
Light.h
executable file
·70 lines (57 loc) · 1.07 KB
/
Light.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#pragma once
#include "vec4.h"
typedef enum
{
LIGHT_ID_AMBIENT=-1,
LIGHT_ID_1=0,
LIGHT_ID_2,
LIGHT_ID_3,
LIGHT_ID_4,
LIGHT_ID_5,
LIGHT_ID_6,
LIGHT_ID_7,
LIGHT_ID_8,
MAX_LIGHT
} LightID;
typedef enum
{
LIGHT_TYPE_DIRECTIONAL,
LIGHT_TYPE_POINT,
LIGHT_TYPE_SPOT
} LightType;
typedef enum
{
LIGHT_SPACE_VIEW,
LIGHT_SPACE_LOCAL
} LightSpace;
class LightParams
{
public:
//light enabled
bool enabled;
//type directional,point,spot
LightType type;
//local or view space
LightSpace space;
//color 0-255 RGB
int colorR;
int colorG;
int colorB;
//position
double posX;
double posY;
double posZ;
vec4 rel_pos;
//direction
double dirX;
double dirY;
double dirZ;
vec4 rel_dir;
LightParams():
enabled(false),type(LIGHT_TYPE_DIRECTIONAL),space(LIGHT_SPACE_VIEW),
colorR(255),colorG(255),colorB(255),posX(0),posY(0),posZ(0),
dirX(0),dirY(0),dirZ(0)
{}
protected:
private:
};