X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fyoink;a=blobdiff_plain;f=src%2FMoof%2FEntity.hh;fp=src%2FMoof%2FEntity.hh;h=0000000000000000000000000000000000000000;hp=4e71466579693ff455d156dde95f836f03e7d112;hb=831f04d4bc19a390415ac0bbac4331c7a65509bc;hpb=299af4f2047e767e5d79501c26444473bda64c64 diff --git a/src/Moof/Entity.hh b/src/Moof/Entity.hh deleted file mode 100644 index 4e71466..0000000 --- a/src/Moof/Entity.hh +++ /dev/null @@ -1,74 +0,0 @@ - -/*] Copyright (c) 2009-2010, Charles McGarvey [************************** -**] All rights reserved. -* -* vi:ts=4 sw=4 tw=75 -* -* Distributable under the terms and conditions of the 2-clause BSD license; -* see the file COPYING for a complete text of the license. -* -**************************************************************************/ - -#ifndef _MOOF_ENTITY_HH_ -#define _MOOF_ENTITY_HH_ - -#include - -#include -#include -#include -#include - - -namespace Mf { - - -class Frustum; - - -/** - * Interface for game objects that can be drawn to the screen and have a - * specified volume (take up space). - */ - -class Entity; -typedef boost::shared_ptr EntityP; - - -class Entity : public Cullable, public Drawable -{ -protected: - - Aabb<3> mAabb; - Sphere<3> mSphere; - -public: - - virtual ~Entity() {} - - virtual void drawIfVisible(Scalar alpha, const Frustum& frustum) const - { - if (isVisible(frustum)) draw(alpha); - } - - virtual bool isVisible(const Frustum& frustum) const - { - return mSphere.isVisible(frustum) && mAabb.isVisible(frustum); - } - - const Aabb<3>& getAabb() const - { - return mAabb; - } - - const Sphere<3>& getSphere() const - { - return mSphere; - } -}; - - -} // namespace Mf - -#endif // _MOOF_ENTITY_HH_ -