Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
blob: 00587f360d9b85be5677569fb98053046b057163 (plain)
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
/*
   model/light.h
   This file is part of the Osirion project and is distributed under
   the terms of the GNU General Public License version 2
*/

#ifndef __INCLUDED_MODEL_LIGHT_H__
#define __INCLUDED_MODEL_LIGHT_H__

#include "math/vector3f.h"
#include "math/color.h"

namespace model
{

/// an exterior light
class Light
{
public:
	Light();
	
	Light(math::Vector3f const & location, math::Color const & color, bool strobe=false);
	
	~Light();
	
	inline math::Vector3f const & location() const
	{
		return light_location;
	}
	
	inline math::Color const & color() const
	{
		return light_color;
	};
	
	/// true if this is a strobe light
	inline bool strobe() const
	{
		return light_strobe;
	}
	
	/// true if this light has entity color
	inline bool entity() const
	{
		return light_entity;
	}
	
	/// size if the light, default is 1.0f
	inline float radius() const
	{
		return light_radius;
	}
	
	/// strobe time offset, in seconds
	inline float offset() const
	{
		return light_offset;
	}
	
	/// frequency in strobes per second
	inline float frequency() const
	{
		return light_frequency;
	}
	
	/// fraction a strobe light will be on, default is 0.5f
	inline float time() const
	{
		return light_time;
	}
	
	/// flare texture number
	inline unsigned int flare() const
	{
		return light_flare;
	}
	
	/// render texture number
	inline size_t texture() const
	{
		return render_texture;
	}
	
	math::Vector3f		light_location;
	math::Color		light_color;
	bool			light_strobe;
	bool			light_entity;
	float			light_radius;
	float			light_frequency;
	float			light_offset;
	float			light_time;
	
	unsigned int		light_flare;
	
	size_t			render_texture;
};

}

#endif // __INCLUDED_MODEL_LIGHT_H__