]>
Dogcows Code - chaz/yoink/blob - src/Moof/Entity.hh
2 /*] Copyright (c) 2009-2010, Charles McGarvey [**************************
3 **] All rights reserved.
7 * Distributable under the terms and conditions of the 2-clause BSD license;
8 * see the file COPYING for a complete text of the license.
10 **************************************************************************/
12 #ifndef _MOOF_ENTITY_HH_
13 #define _MOOF_ENTITY_HH_
15 #include <boost/shared_ptr.hpp>
17 #include <Moof/Aabb.hh>
18 #include <Moof/Cullable.hh>
19 #include <Moof/Drawable.hh>
20 #include <Moof/Sphere.hh>
30 * Interface for game objects that can be drawn to the screen and have a
31 * specified volume (take up space).
35 typedef boost::shared_ptr
<Entity
> EntityP
;
38 class Entity
: public Cullable
, public Drawable
49 virtual void drawIfVisible(Scalar alpha
, const Frustum
& frustum
) const
51 if (isVisible(frustum
)) draw(alpha
);
54 virtual bool isVisible(const Frustum
& frustum
) const
56 return mSphere
.isVisible(frustum
) && mAabb
.isVisible(frustum
);
59 const Aabb
<3>& getAabb() const
64 const Sphere
<3>& getSphere() const
73 #endif // _MOOF_ENTITY_HH_
This page took 0.035368 seconds and 4 git commands to generate.