/*] Copyright (c) 2009-2011, Charles McGarvey [***************************** **] All rights reserved. * * 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 // forward declarations namespace moof { class settings; } class Character; class Scene; typedef boost::shared_ptr SceneP; class Scene : public moof::cullable, public moof::drawable { 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_