From 5c96b74c76b881b1533432a75d1a8cc42ecc5bda Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Wed, 23 Jul 2008 19:51:06 +0000 Subject: fragment renderer --- src/model/light.h | 77 ++++++++++++++++++++++++++++++++++++++----------------- 1 file changed, 54 insertions(+), 23 deletions(-) (limited to 'src/model/light.h') diff --git a/src/model/light.h b/src/model/light.h index b834623..00587f3 100644 --- a/src/model/light.h +++ b/src/model/light.h @@ -10,45 +10,76 @@ #include "math/vector3f.h" #include "math/color.h" -namespace model { +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; }; - + 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; } - + inline bool strobe() const + { + return light_strobe; + } + /// true if this light has entity color - inline bool entity() const { return light_entity; } - + inline bool entity() const + { + return light_entity; + } + /// size if the light, default is 1.0f - inline float radius() const { return light_radius; } + inline float radius() const + { + return light_radius; + } /// strobe time offset, in seconds - inline float offset() const { return light_offset; } - + inline float offset() const + { + return light_offset; + } + /// frequency in strobes per second - inline float frequency() const { return light_frequency; } - + 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; } - + inline float time() const + { + return light_time; + } + /// flare texture number - inline unsigned int flare() const { return light_flare; } - + inline unsigned int flare() const + { + return light_flare; + } + /// render texture number - inline size_t texture() const { return render_texture; } + inline size_t texture() const + { + return render_texture; + } math::Vector3f light_location; math::Color light_color; @@ -58,9 +89,9 @@ public: float light_frequency; float light_offset; float light_time; - + unsigned int light_flare; - + size_t render_texture; }; -- cgit v1.2.3