*******************************************************************************/
-#ifndef _MOOF_PROFILER_HH_
-#define _MOOF_PROFILER_HH_
+#ifndef _MOOF_ENTITY_HH_
+#define _MOOF_ENTITY_HH_
-/**
- * @file Profiler.hh
- * Braindead-simple profiler.
- */
+#include <boost/shared_ptr.hpp>
-#include <ctime>
+#include <Moof/Aabb.hh>
+#include <Moof/Drawable.hh>
+#include <Moof/Cullable.hh>
namespace Mf {
-class Profiler
-{
+
+/**
+ * Interface for game objects that can be drawn to the screen and half a
+ * specified size.
+ */
+
+class Entity : public Drawable, public Cullable
+{
public:
- Profiler(const char* name = "")
- {
- start(name);
- }
- ~Profiler()
+ const Aabb& getAabb() const
{
- stop();
- }
-
- void start(const char* name = "")
- {
- begin = std::clock();
- std::cout << "Profiling " << name << "... ";
+ return aabb_;
}
- void stop()
- {
- if (begin == -1) return;
- double elapsed = double(std::clock() - begin) / double(CLOCKS_PER_SEC);
- std::cout << elapsed << " sec" << std::endl;
- begin = -1;
- }
+protected:
+ Aabb aabb_;
+};
- void cancel()
- {
- begin = -1;
- }
+typedef boost::shared_ptr<Entity> EntityPtr;
-private:
- std::clock_t begin;
-};
} // namespace Mf
-
-#endif // _MOOF_PROFILER_HH_
+#endif // _MOOF_ENTITY_HH_
/** vim: set ts=4 sw=4 tw=80: *************************************************/