X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fyoink;a=blobdiff_plain;f=src%2FMoof%2FEntity.hh;h=dc600103e54e890bcc2e0e5713f69619d3286a25;hp=f593d0cd316d872468e44b11b290750c4ffcc8fe;hb=a4debfe4a5f5d339410788971b698ba00cb7f09c;hpb=72d4af22710317acffab861421c4364b1780b6fe diff --git a/src/Moof/Entity.hh b/src/Moof/Entity.hh index f593d0c..dc60010 100644 --- a/src/Moof/Entity.hh +++ b/src/Moof/Entity.hh @@ -40,40 +40,28 @@ namespace Mf { -class Camera; +class Entity; +typedef boost::shared_ptr EntityP; + +class Frustum; + /** * 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: - inline virtual ~Entity() {} - - const Aabb& getAabb() const - { - return aabb_; - } + virtual ~Entity() {} - const Sphere& getSphere() const + virtual void drawIfVisible(Scalar alpha, const Frustum& frustum) const { - return sphere_; + if (isVisible(frustum)) draw(alpha); } - - virtual void drawIfVisible(Scalar alpha, const Camera& cam) const - { - if (isVisible(cam)) draw(alpha); - } - -protected: - Aabb aabb_; - Sphere sphere_; }; -typedef boost::shared_ptr EntityPtr; - } // namespace Mf