X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fyoink;a=blobdiff_plain;f=src%2FMoof%2FEntity.hh;h=dc600103e54e890bcc2e0e5713f69619d3286a25;hp=33efcc9e77ca20afbc362184007306e0ca586c7f;hb=a4debfe4a5f5d339410788971b698ba00cb7f09c;hpb=fdfba4553433b9b2804c2772c7645211b828c2ea diff --git a/src/Moof/Entity.hh b/src/Moof/Entity.hh index 33efcc9..dc60010 100644 --- a/src/Moof/Entity.hh +++ b/src/Moof/Entity.hh @@ -43,7 +43,7 @@ namespace Mf { class Entity; typedef boost::shared_ptr EntityP; -class Camera; +class Frustum; /** @@ -51,29 +51,15 @@ class Camera; * specified size. */ -class Entity : public Drawable, public Cullable +class Entity : public Cullable, public Drawable { public: - inline virtual ~Entity() {} + virtual ~Entity() {} - const Aabb& getAabb() const + virtual void drawIfVisible(Scalar alpha, const Frustum& frustum) const { - return aabb_; + if (isVisible(frustum)) draw(alpha); } - - const Sphere& getSphere() const - { - return sphere_; - } - - virtual void drawIfVisible(Scalar alpha, const Camera& cam) const - { - if (isVisible(cam)) draw(alpha); - } - -protected: - Aabb aabb_; - Sphere sphere_; };