From 98726fdef45263a8423e6b7ebe49c15dd26621d7 Mon Sep 17 00:00:00 2001 From: Alessandro Ranellucci Date: Sun, 7 Jul 2013 22:36:14 +0200 Subject: Move everything into the Slic3r namespace. #1301 --- xs/src/ExPolygon.hpp | 4 ++++ xs/src/Point.hpp | 4 ++++ xs/src/TriangleMesh.cpp | 4 ++++ xs/src/TriangleMesh.hpp | 4 ++++ xs/src/ZTable.hpp | 4 ++++ xs/src/myinit.h | 3 +++ 6 files changed, 23 insertions(+) (limited to 'xs') diff --git a/xs/src/ExPolygon.hpp b/xs/src/ExPolygon.hpp index 7e77a3814..20298063f 100644 --- a/xs/src/ExPolygon.hpp +++ b/xs/src/ExPolygon.hpp @@ -10,6 +10,8 @@ extern "C" { #include "Point.hpp" +namespace Slic3r { + typedef std::vector Polygon; typedef std::vector Polygons; @@ -48,4 +50,6 @@ polygon2perl(Polygon& poly) { return (SV*)newRV_noinc((SV*)av); } +} + #endif diff --git a/xs/src/Point.hpp b/xs/src/Point.hpp index b468e37e2..211b9f969 100644 --- a/xs/src/Point.hpp +++ b/xs/src/Point.hpp @@ -8,6 +8,8 @@ extern "C" { #include "ppport.h" } +namespace Slic3r { + class Point { public: @@ -24,4 +26,6 @@ point2perl(Point& point) { return (SV*)newRV_noinc((SV*)av); } +} + #endif diff --git a/xs/src/TriangleMesh.cpp b/xs/src/TriangleMesh.cpp index 462a93347..546a2dfe5 100644 --- a/xs/src/TriangleMesh.cpp +++ b/xs/src/TriangleMesh.cpp @@ -1,5 +1,7 @@ #include "TriangleMesh.hpp" +namespace Slic3r { + TriangleMesh::TriangleMesh() {} TriangleMesh::~TriangleMesh() { stl_close(&stl); @@ -130,3 +132,5 @@ TriangleMesh::ToPerl() { av_store(result, 1, newRV_noinc((SV*)facets)); return result; } + +} diff --git a/xs/src/TriangleMesh.hpp b/xs/src/TriangleMesh.hpp index 56380ebf8..90e98d90a 100644 --- a/xs/src/TriangleMesh.hpp +++ b/xs/src/TriangleMesh.hpp @@ -10,6 +10,8 @@ extern "C" { #include "ppport.h" } +namespace Slic3r { + class TriangleMesh { public: @@ -24,4 +26,6 @@ class TriangleMesh stl_file stl; }; +} + #endif diff --git a/xs/src/ZTable.hpp b/xs/src/ZTable.hpp index 045722eec..fcdf553fe 100644 --- a/xs/src/ZTable.hpp +++ b/xs/src/ZTable.hpp @@ -8,6 +8,8 @@ extern "C" { #include "ppport.h" } +namespace Slic3r { + class ZTable { public: @@ -21,4 +23,6 @@ ZTable::ZTable(std::vector* ztable) : { } +} + #endif diff --git a/xs/src/myinit.h b/xs/src/myinit.h index 4f534519c..633fe7583 100644 --- a/xs/src/myinit.h +++ b/xs/src/myinit.h @@ -3,6 +3,9 @@ #include +namespace Slic3r {} +using namespace Slic3r; + #define av_store_point_xy(AV, X, Y) \ av_store(AV, 0, newSViv(X)); \ av_store(AV, 1, newSViv(Y)) -- cgit v1.2.3