X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2FMoof%2FEntity.hh;h=f593d0cd316d872468e44b11b290750c4ffcc8fe;hb=5fa5f117f28922a7e539a432367960c1a61f837d;hp=7595054e68e8aa534b7c58966c6687cb22f5f487;hpb=493ddb59a8620b49dfa0ff62ce93395ebfd02e86;p=chaz%2Fyoink diff --git a/src/Moof/Entity.hh b/src/Moof/Entity.hh index 7595054..f593d0c 100644 --- a/src/Moof/Entity.hh +++ b/src/Moof/Entity.hh @@ -34,26 +34,42 @@ #include #include #include +#include namespace Mf { +class Camera; + /** - * Interface for game objects that can be drawn to the screen and half a + * Interface for game objects that can be drawn to the screen and have a * specified size. */ class Entity : public Drawable, public Cullable { public: + inline virtual ~Entity() {} + const Aabb& getAabb() const { return aabb_; } + const Sphere& getSphere() const + { + return sphere_; + } + + virtual void drawIfVisible(Scalar alpha, const Camera& cam) const + { + if (isVisible(cam)) draw(alpha); + } + protected: - Aabb aabb_; + Aabb aabb_; + Sphere sphere_; }; typedef boost::shared_ptr EntityPtr;