X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fyoink;a=blobdiff_plain;f=src%2FScene.hh;h=7558e3a6fce7af7a09587dffd15860a04b34996f;hp=24a790f26490a7cd2edc0da1fe798aaca19200ef;hb=7f3984f3f9524f5b6813e01ceb2fe576dadff94e;hpb=64bd443538f57ad1bdff6c6b35953e72141129b2 diff --git a/src/Scene.hh b/src/Scene.hh index 24a790f..7558e3a 100644 --- a/src/Scene.hh +++ b/src/Scene.hh @@ -29,6 +29,7 @@ #ifndef _SCENE_HH_ #define _SCENE_HH_ +#include #include #include @@ -36,6 +37,7 @@ #include #include #include +#include class Character; @@ -47,20 +49,26 @@ typedef boost::shared_ptr SceneP; class Scene : public Mf::Cullable, public Mf::Drawable, public Mf::Resource { class Impl; - boost::shared_ptr impl_; + boost::shared_ptr mImpl; public: - Scene(const std::string& name); + explicit Scene(const std::string& name); static SceneP alloc(const std::string& name) { return SceneP(new Scene(name)); } + Mf::Script::Result load(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::Intersection>& hits) const; bool checkForCollision(Character& character); static std::string getPath(const std::string& name);