diff options
author | Stijn Buys <ingar@osirion.org> | 2008-05-03 21:04:02 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2008-05-03 21:04:02 +0000 |
commit | 82293065b52f5a4e5c4ccde5eade4ebae18014ca (patch) | |
tree | 254f1fa3259f03f033b3d1fd225742a12de167b1 /src/model/light.h | |
parent | 5388c37bdc040ba50d21ec16a01f399d20592a90 (diff) |
liibmodel
Diffstat (limited to 'src/model/light.h')
-rw-r--r-- | src/model/light.h | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/src/model/light.h b/src/model/light.h new file mode 100644 index 0000000..e202d21 --- /dev/null +++ b/src/model/light.h @@ -0,0 +1,63 @@ +/* + 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(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; } + + /// 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 size_t 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; + float light_radius; + float light_frequency; + float light_offset; + float light_time; + + size_t light_flare; + + size_t render_texture; +}; + +} + +#endif // __INCLUDED_MODEL_LIGHT_H__ + |