My Project: openb3dlib.mod/openb3d/src/light.h Source File

My Project

light.h
Go to the documentation of this file.
1 /*
2 * light.h
3 * iminib3d
4 *
5 * Created by Simon Harrison.
6 * Copyright Si Design. All rights reserved.
7 *
8 */
9
10 #ifndef LIGHT_H
11 #define LIGHT_H
12
13 #include "entity.h"
14
15 #include <vector>
16 #include <cmath>
17 using namespace std;
18
19 class Light : public Entity{
20
21 public:
22
23 static int light_no;
24 static int no_lights;
25 static int max_lights;
26
27 // enter gl consts here for each available light
28 static int gl_light[];
29
30 static vector<Light*> light_list;
31
32 char cast_shadow;
33 char light_type;
34 float range;
35 float red,green,blue;
36 float inner_ang,outer_ang;
37
38 Light(){
39
40 cast_shadow=1;
41 light_type=0;
42 range=1.0/1000.0;
43 red=1.0;
44 green=1.0;
45 blue=1.0;
46 inner_ang=0.0;
47 outer_ang=45.0;
48
49 }
50
51 Light* CopyEntity(Entity* parent_ent=NULL);
52 void FreeEntity(void);
53
54 static Light* CreateLight(int l_type=1,Entity* parent_ent=NULL);
55 void LightRange(float light_range);
56 void LightColor(float r,float g,float b);
57 void LightConeAngles(float inner,float outer);
58 void Update();
59
60 };
61
62 #endif
LightConeAngles
void LightConeAngles(Light *light, float inner_ang, float outer_ang)
Definition: functions.cpp:998
entity.h
Light::range
float range
Definition: light.h:34
Light
Definition: light.h:19
CopyEntity
Entity * CopyEntity(Entity *ent, Entity *parent)
Definition: functions.cpp:421
Light::red
float red
Definition: light.h:35
std
CreateLight
Light * CreateLight(int light_type, Entity *parent)
Definition: functions.cpp:517
LightRange
void LightRange(Light *light, float range)
Definition: functions.cpp:1006
FreeEntity
void FreeEntity(Entity *ent)
Definition: functions.cpp:882
Entity
Definition: entity.h:27
Light::cast_shadow
char cast_shadow
Definition: light.h:32
LightColor
void LightColor(Light *light, float red, float green, float blue)
Definition: functions.cpp:991
Light::no_lights
static int no_lights
Definition: light.h:24
Light::light_type
char light_type
Definition: light.h:33
Light::Light
Light()
Definition: light.h:38
Light::light_no
static int light_no
Definition: light.h:23
Light::light_list
static vector< Light * > light_list
Definition: light.h:30
Light::outer_ang
float outer_ang
Definition: light.h:36
Light::max_lights
static int max_lights
Definition: light.h:25
NULL
#define NULL
Definition: tree.cpp:4