X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2FScene.hh;h=7558e3a6fce7af7a09587dffd15860a04b34996f;hb=be9ebc1104574e5e81e19c5caba0c23b54df826d;hp=ca96aeaca15d93d5053919afa98d5cbd5b38822b;hpb=a4debfe4a5f5d339410788971b698ba00cb7f09c;p=chaz%2Fyoink diff --git a/src/Scene.hh b/src/Scene.hh index ca96aea..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,10 @@ #include #include #include +#include + + +class Character; class Scene; @@ -44,20 +49,28 @@ 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); };