mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-08-17 11:05:53 +08:00
Remove Point.cpp
This commit is contained in:
parent
5a11d4df89
commit
4093280566
@ -20,9 +20,7 @@ src/admesh/util.c
|
|||||||
src/admesh/util.o
|
src/admesh/util.o
|
||||||
src/ExPolygon.hpp
|
src/ExPolygon.hpp
|
||||||
src/myinit.h
|
src/myinit.h
|
||||||
src/Point.cpp
|
|
||||||
src/Point.hpp
|
src/Point.hpp
|
||||||
src/Point.o
|
|
||||||
src/ppport.h
|
src/ppport.h
|
||||||
src/TriangleMesh.cpp
|
src/TriangleMesh.cpp
|
||||||
src/TriangleMesh.hpp
|
src/TriangleMesh.hpp
|
||||||
|
@ -44,7 +44,7 @@ polygon2perl(Polygon& poly) {
|
|||||||
AV* av = newAV();
|
AV* av = newAV();
|
||||||
av_extend(av, num_points-1);
|
av_extend(av, num_points-1);
|
||||||
for (unsigned int i = 0; i < num_points; i++) {
|
for (unsigned int i = 0; i < num_points; i++) {
|
||||||
av_store(av, i, poly[i]._toPerl());
|
av_store(av, i, point2perl(poly[i]));
|
||||||
}
|
}
|
||||||
return (SV*)newRV_noinc((SV*)av);
|
return (SV*)newRV_noinc((SV*)av);
|
||||||
}
|
}
|
||||||
|
@ -1,13 +0,0 @@
|
|||||||
#include "myinit.h"
|
|
||||||
#include "Point.hpp"
|
|
||||||
|
|
||||||
Point::~Point() {}
|
|
||||||
|
|
||||||
|
|
||||||
SV*
|
|
||||||
Point::_toPerl() {
|
|
||||||
AV* av = newAV();
|
|
||||||
av_fill(av, 1);
|
|
||||||
av_store_point_xy(av, x, y);
|
|
||||||
return (SV*)newRV_noinc((SV*)av);
|
|
||||||
}
|
|
@ -14,8 +14,14 @@ class Point
|
|||||||
unsigned long x;
|
unsigned long x;
|
||||||
unsigned long y;
|
unsigned long y;
|
||||||
Point(unsigned long _x = 0, unsigned long _y = 0): x(_x), y(_y) {};
|
Point(unsigned long _x = 0, unsigned long _y = 0): x(_x), y(_y) {};
|
||||||
~Point();
|
|
||||||
SV* _toPerl();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
SV*
|
||||||
|
point2perl(Point& point) {
|
||||||
|
AV* av = newAV();
|
||||||
|
av_fill(av, 1);
|
||||||
|
av_store_point_xy(av, point.x, point.y);
|
||||||
|
return (SV*)newRV_noinc((SV*)av);
|
||||||
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -7,8 +7,16 @@
|
|||||||
|
|
||||||
%name{Slic3r::Point::XS} class Point {
|
%name{Slic3r::Point::XS} class Point {
|
||||||
Point(unsigned long _x = 0, unsigned long _y = 0);
|
Point(unsigned long _x = 0, unsigned long _y = 0);
|
||||||
~Point();
|
%{
|
||||||
SV* _toPerl();
|
|
||||||
|
SV*
|
||||||
|
Point::_toPerl()
|
||||||
|
CODE:
|
||||||
|
RETVAL = point2perl(*THIS);
|
||||||
|
OUTPUT:
|
||||||
|
RETVAL
|
||||||
|
|
||||||
|
%}
|
||||||
};
|
};
|
||||||
|
|
||||||
%package{Slic3r::Point::XS};
|
%package{Slic3r::Point::XS};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user