/*] Copyright (c) 2009-2010, Charles McGarvey [************************** **] All rights reserved. * * vi:ts=4 sw=4 tw=75 * * Distributable under the terms and conditions of the 2-clause BSD license; * see the file COPYING for a complete text of the license. * **************************************************************************/ #ifndef _SCENE_HH_ #define _SCENE_HH_ #include #include #include #include #include #include #include class Character; namespace moof { class settings; } class Scene; typedef boost::shared_ptr SceneP; class Scene : public moof::cullable, public moof::drawable, public moof::resource { class impl; boost::shared_ptr impl_; public: explicit Scene(const std::string& name); static SceneP alloc(const std::string& name) { return SceneP(new Scene(name)); } moof::script::status load(moof::settings& settings, moof::script& script); void draw(moof::scalar alpha) const; void draw_if_visible(moof::scalar alpha, const moof::frustum& frustum) const; moof::scalar getZCoord(const moof::vector2& position) const; bool castRay(const moof::ray<2>& ray, std::list::contact>& hits) const; bool checkForCollision(Character& character); }; #endif // _SCENE_HH_