X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fyoink;a=blobdiff_plain;f=src%2FMoof%2FEntity.hh;h=310e0a128cbb52c0371ec742390d3d46144fcaeb;hp=f593d0cd316d872468e44b11b290750c4ffcc8fe;hb=7e898e8ec0ff716e2fc722b883a626a6c346f107;hpb=72d4af22710317acffab861421c4364b1780b6fe diff --git a/src/Moof/Entity.hh b/src/Moof/Entity.hh index f593d0c..310e0a1 100644 --- a/src/Moof/Entity.hh +++ b/src/Moof/Entity.hh @@ -40,17 +40,21 @@ 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() {} + virtual ~Entity() {} const Aabb& getAabb() const { @@ -62,9 +66,9 @@ public: return sphere_; } - virtual void drawIfVisible(Scalar alpha, const Camera& cam) const + void drawIfVisible(Scalar alpha, const Frustum& frustum) const { - if (isVisible(cam)) draw(alpha); + if (isVisible(frustum)) draw(alpha); } protected: @@ -72,8 +76,6 @@ protected: Sphere sphere_; }; -typedef boost::shared_ptr EntityPtr; - } // namespace Mf