X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fyoink;a=blobdiff_plain;f=src%2FMoof%2FAnimation.hh;h=38a055d8834c56fa9fa6f309057aadb4afd89af0;hp=57ce6a8ffe6f280b5a8396d77725bef07b8b86c2;hb=7e898e8ec0ff716e2fc722b883a626a6c346f107;hpb=c2321281bf12a7efaedde930422c7ddbc92080d4 diff --git a/src/Moof/Animation.hh b/src/Moof/Animation.hh index 57ce6a8..38a055d 100644 --- a/src/Moof/Animation.hh +++ b/src/Moof/Animation.hh @@ -45,6 +45,9 @@ namespace Mf { +class Animation; +typedef boost::shared_ptr AnimationP; + /** * A class to manage frame-based animation. Animation sequences can be loaded * from file, then named sequences are started. The animation is updated @@ -55,7 +58,16 @@ namespace Mf { class Animation : public Resource { + class Impl; + boost::shared_ptr impl_; + public: + + static AnimationP alloc(const std::string& name) + { + return AnimationP(new Animation(name)); + } + Animation(const std::string& name); void startSequence(const std::string& name); @@ -63,11 +75,7 @@ public: void update(Scalar t, Scalar dt); unsigned getFrame() const; - static std::string getPathToResource(const std::string& name); - -private: - class AnimationImpl; - boost::shared_ptr impl_; + static std::string getPath(const std::string& name); };