From 517d35b2bbaeb3ee4b7e29301cd41bb58628bf3e Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sun, 9 Mar 2008 18:40:31 +0000 Subject: parse of light entities in models --- src/core/model.h | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'src/core/model.h') diff --git a/src/core/model.h b/src/core/model.h index b273c46..013edcc 100644 --- a/src/core/model.h +++ b/src/core/model.h @@ -58,6 +58,23 @@ private: math::Vector3f engine_location; }; +/// an exterior light +class Light +{ +public: + Light(math::Vector3f const & location, math::Color const & color); + ~Light(); + + inline math::Vector3f const & location() const { return light_location; } + + inline math::Color const & color() const { return light_color; }; + +private: + math::Vector3f light_location; + math::Color light_color; +}; + + /// a 3D model contains a list of faces class Model { @@ -94,17 +111,20 @@ public: /// list of Engines std::list model_engine; + + /// list of Lights + std::list model_light; private: void make_face(math::Plane3f *face, std::vector & planes); void add_engine(Engine *engine); void add_face(Face *face); + void add_light(Light *light); std::string model_name; float model_scale; bool model_valid; - }; } -- cgit v1.2.3