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"
namespace Slic3r {
typedef std::vector<Point> Polygon;
typedef std::vector<Polygon> Polygons;
@ -48,4 +50,6 @@ polygon2perl(Polygon& poly) {
return (SV*)newRV_noinc((SV*)av);
}
}
#endif

View file

@ -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

View file

@ -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;
}
}

View file

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

View file

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

View file

@ -3,6 +3,9 @@
#include <vector>
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))