]> Dogcows Code - chaz/yoink/blobdiff - src/Moof/Entity.hh
fixed layer bugs; generalized octree
[chaz/yoink] / src / Moof / Entity.hh
index 7595054e68e8aa534b7c58966c6687cb22f5f487..dc600103e54e890bcc2e0e5713f69619d3286a25 100644 (file)
 #include <Moof/Aabb.hh>
 #include <Moof/Cullable.hh>
 #include <Moof/Drawable.hh>
+#include <Moof/Sphere.hh>
 
 
 namespace Mf {
 
 
+class Entity;
+typedef boost::shared_ptr<Entity> 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<Entity> EntityPtr;
-
 
 } // namespace Mf
 
This page took 0.017603 seconds and 4 git commands to generate.