1 #ifndef LIBR2C2_OBJECT_H_
2 #define LIBR2C2_OBJECT_H_
5 #include "objecttype.h"
15 sigc::signal<void> signal_moved;
28 virtual Object *clone(Layout * = 0) const = 0;
29 virtual const ObjectType &get_type() const = 0;
30 Layout &get_layout() const { return layout; }
31 virtual void set_position(const Vector &) = 0;
32 virtual void set_rotation(const Angle &) = 0;
33 virtual void set_tilt(const Angle &) = 0;
34 const Vector &get_position() const { return position; }
35 const Angle &get_rotation() const { return rotation; }
36 const Angle &get_tilt() const { return tilt; }
37 virtual Object *get_parent() const { return 0; }
39 virtual unsigned get_n_snap_nodes() const { return 0; }
40 virtual Snap get_snap_node(unsigned) const;
41 virtual bool snap(Snap &, float, SnapType = SNAP_DEFAULT) const;
42 virtual bool snap_to(const Object &, float, SnapType = SNAP_DEFAULT);
44 virtual SnapType get_default_snap_type_to(const Object &) const { return NO_SNAP; }
47 virtual unsigned get_n_link_slots() const { return 0; }
48 virtual Object *get_link(unsigned) const;
49 virtual int get_link_slot(const Object &) const { return -1; }
50 virtual bool link_to(Object &) { return false; }
51 virtual bool break_link(Object &);
52 virtual bool break_link(unsigned) { return false; }
53 virtual void break_links();
55 const Shape *get_shape() const;
56 virtual bool collide_ray(const Ray &) const;
57 virtual BoundingBox get_bounding_box() const;