Move Geometry.cpp to Slic3r::Geometry namespace

This commit is contained in:
Alessandro Ranellucci 2013-11-23 21:54:56 +01:00
parent 30297ee4dc
commit 3a5e4931cc
3 changed files with 8 additions and 7 deletions

View File

@ -2,7 +2,7 @@
#include <algorithm> #include <algorithm>
#include <map> #include <map>
namespace Slic3r { namespace Slic3r { namespace Geometry {
static bool static bool
sort_points (Point a, Point b) sort_points (Point a, Point b)
@ -80,4 +80,4 @@ chained_path(Points &points, std::vector<Points::size_type> &retval)
chained_path(points, retval, points.front()); chained_path(points, retval, points.front());
} }
} } }

View File

@ -3,12 +3,12 @@
#include "Polygon.hpp" #include "Polygon.hpp"
namespace Slic3r { namespace Slic3r { namespace Geometry {
void convex_hull(Points points, Polygon &hull); void convex_hull(Points points, Polygon &hull);
void chained_path(Points &points, std::vector<Points::size_type> &retval, Point start_near); void chained_path(Points &points, std::vector<Points::size_type> &retval, Point start_near);
void chained_path(Points &points, std::vector<Points::size_type> &retval); void chained_path(Points &points, std::vector<Points::size_type> &retval);
} } }
#endif #endif

View File

@ -5,6 +5,7 @@
#include "Geometry.hpp" #include "Geometry.hpp"
%} %}
%package{Slic3r::Geometry}; %package{Slic3r::Geometry};
%{ %{
@ -16,7 +17,7 @@ convex_hull(points)
const char* CLASS = "Slic3r::Polygon"; const char* CLASS = "Slic3r::Polygon";
CODE: CODE:
RETVAL = new Polygon (); RETVAL = new Polygon ();
convex_hull(points, *RETVAL); Slic3r::Geometry::convex_hull(points, *RETVAL);
OUTPUT: OUTPUT:
RETVAL RETVAL
@ -24,7 +25,7 @@ std::vector<Points::size_type>
chained_path(points) chained_path(points)
Points points Points points
CODE: CODE:
chained_path(points, RETVAL); Slic3r::Geometry::chained_path(points, RETVAL);
OUTPUT: OUTPUT:
RETVAL RETVAL
@ -33,7 +34,7 @@ chained_path_from(points, start_from)
Points points Points points
Point* start_from Point* start_from
CODE: CODE:
chained_path(points, RETVAL, *start_from); Slic3r::Geometry::chained_path(points, RETVAL, *start_from);
OUTPUT: OUTPUT:
RETVAL RETVAL