X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fyoink;a=blobdiff_plain;f=src%2FMoof%2FEntity.hh;h=dc600103e54e890bcc2e0e5713f69619d3286a25;hp=7595054e68e8aa534b7c58966c6687cb22f5f487;hb=a4debfe4a5f5d339410788971b698ba00cb7f09c;hpb=493ddb59a8620b49dfa0ff62ce93395ebfd02e86 diff --git a/src/Moof/Entity.hh b/src/Moof/Entity.hh index 7595054..dc60010 100644 --- a/src/Moof/Entity.hh +++ b/src/Moof/Entity.hh @@ -34,30 +34,34 @@ #include #include #include +#include namespace Mf { +class Entity; +typedef boost::shared_ptr EntityP; + +class Frustum; + + /** - * 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 +class Entity : public Cullable, public Drawable { public: - const Aabb& getAabb() const + virtual ~Entity() {} + + virtual void drawIfVisible(Scalar alpha, const Frustum& frustum) const { - return aabb_; + if (isVisible(frustum)) draw(alpha); } - -protected: - Aabb aabb_; }; -typedef boost::shared_ptr EntityPtr; - } // namespace Mf