class Object
{
+public:
+ sigc::signal<void> signal_moved;
+
protected:
Layout &layout;
Vector position;
- float rotation;
+ Angle rotation;
+ Angle tilt;
+ Shape *shape;
- Object(Layout &l): layout(l) { }
+ Object(Layout &);
public:
virtual ~Object() { }
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;
+ virtual void set_rotation(const Angle &) = 0;
+ virtual void set_tilt(const Angle &) = 0;
const Vector &get_position() const { return position; }
- float get_rotation() const { return rotation; }
+ const Angle &get_rotation() const { return rotation; }
+ const Angle &get_tilt() const { return tilt; }
virtual Object *get_parent() const { return 0; }
virtual unsigned get_n_snap_nodes() const { return 0; }
virtual bool break_link(unsigned) { return false; }
virtual void break_links();
- virtual bool collide_ray(const Vector &, const Vector &) const = 0;
+ const Shape *get_shape() const;
+ virtual bool collide_ray(const Ray &, float * = 0) const;
+ virtual BoundingBox get_bounding_box() const;
};
} // namespace R2C2