Code

Connector tool: make connectors avoid the convex hull of shapes.
[inkscape.git] / src / persp3d.h
index 4819a52e997073aa29131d4a76b69310dbb3bc35..79bec0232c5372465266a04e90924ade2e8e1481 100644 (file)
@@ -18,7 +18,7 @@
 #define SP_IS_PERSP3D(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SP_TYPE_PERSP3D))
 #define SP_IS_PERSP3D_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SP_TYPE_PERSP3D))
 
-#include <set>
+#include <list>
 #include <vector>
 #include <map>
 #include "sp-item.h"
@@ -34,7 +34,7 @@ struct Persp3D : public SPObject {
 
     // Also write the list of boxes into the xml repr and vice versa link boxes to their persp3d?
     std::vector<SPBox3D *> boxes;
-    std::map<SPBox3D *, bool> boxes_transformed; // TODO: eventually we should merge this with 'boxes'
+    std::map<SPBox3D *, bool>* boxes_transformed; // TODO: eventually we should merge this with 'boxes'
     SPDocument *document; // should this rather be the SPDesktop?
 
     // for debugging only
@@ -56,17 +56,17 @@ inline Persp3D * persp3d_get_from_repr (Inkscape::XML::Node *repr) {
 inline Proj::Pt2 persp3d_get_VP (Persp3D *persp, Proj::Axis axis) {
     return persp->tmat.column(axis);
 }
-NR::Point persp3d_get_PL_dir_from_pt (Persp3D *persp, NR::Point const &pt, Proj::Axis axis); // convenience wrapper around the following two
-NR::Point persp3d_get_finite_dir (Persp3D *persp, NR::Point const &pt, Proj::Axis axis);
-NR::Point persp3d_get_infinite_dir (Persp3D *persp, Proj::Axis axis);
+Geom::Point persp3d_get_PL_dir_from_pt (Persp3D *persp, Geom::Point const &pt, Proj::Axis axis); // convenience wrapper around the following two
+Geom::Point persp3d_get_finite_dir (Persp3D *persp, Geom::Point const &pt, Proj::Axis axis);
+Geom::Point persp3d_get_infinite_dir (Persp3D *persp, Proj::Axis axis);
 double persp3d_get_infinite_angle (Persp3D *persp, Proj::Axis axis);
 bool persp3d_VP_is_finite (Persp3D *persp, Proj::Axis axis);
 void persp3d_toggle_VP (Persp3D *persp, Proj::Axis axis, bool set_undo = true);
-void persp3d_toggle_VPs (std::set<Persp3D *>, Proj::Axis axis);
+void persp3d_toggle_VPs (std::list<Persp3D *>, Proj::Axis axis);
 void persp3d_set_VP_state (Persp3D *persp, Proj::Axis axis, Proj::VPState state);
 void persp3d_rotate_VP (Persp3D *persp, Proj::Axis axis, double angle, bool alt_pressed); // angle is in degrees
 void persp3d_update_with_point (Persp3D *persp, Proj::Axis const axis, Proj::Pt2 const &new_image);
-void persp3d_apply_affine_transformation (Persp3D *persp, NR::Matrix const &xform);
+void persp3d_apply_affine_transformation (Persp3D *persp, Geom::Matrix const &xform);
 gchar * persp3d_pt_to_str (Persp3D *persp, Proj::Axis const axis);
 
 void persp3d_add_box (Persp3D *persp, SPBox3D *box);
@@ -92,9 +92,9 @@ void persp3d_absorb(Persp3D *persp1, Persp3D *persp2);
 Persp3D * persp3d_create_xml_element (SPDocument *document, Persp3D *dup = NULL);
 Persp3D * persp3d_document_first_persp (SPDocument *document);
 
-std::set<Persp3D *> persp3d_currently_selected_persps();
 bool persp3d_has_all_boxes_in_selection (Persp3D *persp);
-std::list<SPBox3D *> persp3d_selected_boxes (Persp3D *persp);
+std::map<Persp3D *, std::list<SPBox3D *> > persp3d_unselected_boxes(Inkscape::Selection *selection);
+void persp3d_split_perspectives_according_to_selection(Inkscape::Selection *selection);
 
 void persp3d_print_debugging_info (Persp3D *persp);
 void persp3d_print_debugging_info_all(SPDocument *doc);