/*] 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 Mf { class Settings; } class Scene; typedef boost::shared_ptr SceneP; class Scene : public Mf::Cullable, public Mf::Drawable, public Mf::Resource { class Impl; boost::shared_ptr mImpl; public: explicit Scene(const std::string& name); static SceneP alloc(const std::string& name) { return SceneP(new Scene(name)); } Mf::Script::Result load(Mf::Settings& settings, Mf::Script& script); void draw(Mf::Scalar alpha) const; void drawIfVisible(Mf::Scalar alpha, const Mf::Frustum& frustum) const; Mf::Scalar getZCoord(const Mf::Vector2& position) const; bool castRay(const Mf::Ray<2>& ray, std::list::Contact>& hits) const; bool checkForCollision(Character& character); static bool getPath(std::string& name); }; #endif // _SCENE_HH_