altEngine
Main Page
Classes
Files
File List
File Members
All
Classes
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
include
light.h
Go to the documentation of this file.
1
#include "
include.h
"
2
3
#ifndef LIGHT_H
4
#define LIGHT_H
5
6
#define MAX_SHADOWVOL 4
7
#define SHADOWVOL_MAX_DIST (400.0f)
8
9
#define NUM_CUBE_FACE 6
10
11
class
Light
12
{
13
public
:
14
Light
(
Entity
*
entity
,
Graphics
&gfx,
int
num,
float
scale);
15
void
render_shadow_volume
(
Graphics
&gfx,
int
index);
16
void
render_map_shadowvol
(
Graphics
&gfx);
17
void
generate_map_volumes
(
Graphics
&gfx,
Bsp
&map,
int
current_light);
18
void
generate_ent_volumes
(
Graphics
&gfx,
vector<Entity *>
&entity_list);
19
20
void
destroy
(
Graphics
&gfx);
21
void
generate_cubemaps
(
Graphics
&gfx);
22
23
Entity
*
entity
;
24
25
// Shadow maps
26
unsigned
int
fbo_shadowmaps
[
NUM_CUBE_FACE
];
27
unsigned
int
quad_tex
[
NUM_CUBE_FACE
];
28
unsigned
int
depth_tex
[
NUM_CUBE_FACE
];
29
unsigned
int
array_tex
;
30
31
32
matrix4
shadow_projection
;
33
matrix4
shadow_matrix
[
NUM_CUBE_FACE
];
34
int
shadow_flag
;
35
36
37
// Shadow Volumes
38
#ifdef SHADOWVOL
39
ShadowVolume
shadow
[
MAX_SHADOWVOL
];
40
int
num_shadowvol
;
41
42
43
ShadowVolume
map_shadow
;
44
#endif
45
46
vec3
color
;
47
float
intensity
;
48
float
attenuation
;
49
bool
active
;
50
bool
timer_flag
;
51
float
lightmap_scale
;
52
int
timer
;
53
unsigned
int
light_num
;
54
};
55
56
#endif
Generated on Tue Nov 21 2017 19:18:54 for altEngine by
1.8.2