altEngine
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
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 
24 
25  // Shadow maps
27  unsigned int quad_tex[NUM_CUBE_FACE];
28  unsigned int depth_tex[NUM_CUBE_FACE];
29  unsigned int array_tex;
30 
31 
35 
36 
37  // Shadow Volumes
38 #ifdef SHADOWVOL
41 
42 
44 #endif
45 
47  float intensity;
48  float attenuation;
49  bool active;
50  bool timer_flag;
52  int timer;
53  unsigned int light_num;
54 };
55 
56 #endif