Move everything into the Slic3r namespace. #1301

This commit is contained in:
Alessandro Ranellucci 2013-07-07 22:36:14 +02:00
parent 6f6ee40dae
commit 98726fdef4
6 changed files with 23 additions and 0 deletions

View file

@ -10,6 +10,8 @@ extern "C" {
#include "Point.hpp" #include "Point.hpp"
namespace Slic3r {
typedef std::vector<Point> Polygon; typedef std::vector<Point> Polygon;
typedef std::vector<Polygon> Polygons; typedef std::vector<Polygon> Polygons;
@ -48,4 +50,6 @@ polygon2perl(Polygon& poly) {
return (SV*)newRV_noinc((SV*)av); return (SV*)newRV_noinc((SV*)av);
} }
}
#endif #endif

View file

@ -8,6 +8,8 @@ extern "C" {
#include "ppport.h" #include "ppport.h"
} }
namespace Slic3r {
class Point class Point
{ {
public: public:
@ -24,4 +26,6 @@ point2perl(Point& point) {
return (SV*)newRV_noinc((SV*)av); return (SV*)newRV_noinc((SV*)av);
} }
}
#endif #endif

View file

@ -1,5 +1,7 @@
#include "TriangleMesh.hpp" #include "TriangleMesh.hpp"
namespace Slic3r {
TriangleMesh::TriangleMesh() {} TriangleMesh::TriangleMesh() {}
TriangleMesh::~TriangleMesh() { TriangleMesh::~TriangleMesh() {
stl_close(&stl); stl_close(&stl);
@ -130,3 +132,5 @@ TriangleMesh::ToPerl() {
av_store(result, 1, newRV_noinc((SV*)facets)); av_store(result, 1, newRV_noinc((SV*)facets));
return result; return result;
} }
}

View file

@ -10,6 +10,8 @@ extern "C" {
#include "ppport.h" #include "ppport.h"
} }
namespace Slic3r {
class TriangleMesh class TriangleMesh
{ {
public: public:
@ -24,4 +26,6 @@ class TriangleMesh
stl_file stl; stl_file stl;
}; };
}
#endif #endif

View file

@ -8,6 +8,8 @@ extern "C" {
#include "ppport.h" #include "ppport.h"
} }
namespace Slic3r {
class ZTable class ZTable
{ {
public: public:
@ -21,4 +23,6 @@ ZTable::ZTable(std::vector<unsigned int>* ztable) :
{ {
} }
}
#endif #endif

View file

@ -3,6 +3,9 @@
#include <vector> #include <vector>
namespace Slic3r {}
using namespace Slic3r;
#define av_store_point_xy(AV, X, Y) \ #define av_store_point_xy(AV, X, Y) \
av_store(AV, 0, newSViv(X)); \ av_store(AV, 0, newSViv(X)); \
av_store(AV, 1, newSViv(Y)) av_store(AV, 1, newSViv(Y))