diff options
Diffstat (limited to 'src/perspective3d.h')
| -rw-r--r-- | src/perspective3d.h | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/src/perspective3d.h b/src/perspective3d.h index c3e07b23b..4134b3fc1 100644 --- a/src/perspective3d.h +++ b/src/perspective3d.h @@ -14,6 +14,7 @@ #include "vanishing-point.h" #include "svg/stringstream.h" +#include <glib.h> class SP3DBox; @@ -27,25 +28,37 @@ public: Perspective3D(Perspective3D &other); ~Perspective3D(); - bool operator== (Perspective3D const &other); + bool operator== (Perspective3D const &other) const; + bool has_vanishing_point (VanishingPoint *vp); VanishingPoint *get_vanishing_point (Box3D::Axis const dir); Axis get_axis_of_VP (VanishingPoint *vp); void set_vanishing_point (Box3D::Axis const dir, VanishingPoint const &pt); void set_vanishing_point (Box3D::Axis const dir, gdouble pt_x, gdouble pt_y, gdouble dir_x, gdouble dir_y, VPState st); void add_box (SP3DBox *box); void remove_box (const SP3DBox *box); - bool has_box (const SP3DBox *box); + bool has_box (const SP3DBox *box) const; + inline guint number_of_boxes () { return g_slist_length (boxes); } void reshape_boxes (Box3D::Axis axes); void update_box_reprs (); + /* convenience functions for interaction with dragging machinery: */ + bool all_boxes_occur_in_list (GSList *boxes_to_do); + GSList * boxes_occurring_in_list (GSList * list_of_boxes); + + void absorb (Perspective3D *other); // swallow the other perspective if both coincide + static gint counter; // for testing only gint my_counter; // for testing only static GSList * perspectives; // All existing 3D perspectives + // FIXME: Perspectives should be linked to the list of existing ones automatically in the constructor + // and removed in the destructor! static void add_perspective (Box3D::Perspective3D * const persp); static void remove_perspective (Box3D::Perspective3D * const persp); - static Box3D::Perspective3D * find_perspective (Box3D::Perspective3D * const persp); // find an existing perspective whose VPs are equal to those of persp + + /* find an existing perspective whose VPs are equal to those of persp */ + static Box3D::Perspective3D * find_perspective (Box3D::Perspective3D * const persp); static void print_debugging_info(); static Perspective3D * current_perspective; |
