+#ifndef LIBR2C2_OBJECT_H_
+#define LIBR2C2_OBJECT_H_
+
+#include "geometry.h"
+#include "objecttype.h"
+
+namespace R2C2 {
+
+class Layout;
+
+class Object
+{
+protected:
+ Layout &layout;
+ Vector position;
+ float rotation;
+
+ Object(Layout &l): layout(l) { }
+public:
+ virtual ~Object() { }
+
+ virtual Object *clone(Layout * = 0) const = 0;
+ virtual const ObjectType &get_type() const = 0;
+ Layout &get_layout() const { return layout; }
+ virtual void set_position(const Vector &) = 0;
+ virtual void set_rotation(float) = 0;
+ const Vector &get_position() const { return position; }
+ float get_rotation() const { return rotation; }
+ virtual Object *get_parent() const { return 0; }
+ virtual bool collide_ray(const Vector &, const Vector &) const = 0;
+};
+
+} // namespace R2C2
+
+#endif