class Entity;
typedef boost::shared_ptr<Entity> EntityP;
-class Camera;
+class Frustum;
/**
* 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_;
};