mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-21 07:41:09 -06:00
More integration of Slic3r::Point::XS
This commit is contained in:
parent
159a009f96
commit
c9749ca3b3
9 changed files with 80 additions and 17 deletions
|
@ -8,16 +8,36 @@
|
|||
%name{Slic3r::Point::XS} class Point {
|
||||
Point(unsigned long _x = 0, unsigned long _y = 0);
|
||||
~Point();
|
||||
Point* clone()
|
||||
%code{% const char* CLASS = "Slic3r::Point::XS"; RETVAL = new Point(*THIS); %};
|
||||
void scale(double factor);
|
||||
void translate(double x, double y);
|
||||
SV* arrayref()
|
||||
%code{% RETVAL = point2perl(*THIS); %};
|
||||
|
||||
%{
|
||||
|
||||
SV*
|
||||
Point::arrayref()
|
||||
void
|
||||
Point::rotate(angle, center_sv)
|
||||
double angle;
|
||||
SV* center_sv;
|
||||
CODE:
|
||||
RETVAL = point2perl(*THIS);
|
||||
Point center;
|
||||
perl2point_check(center_sv, center);
|
||||
THIS->rotate(angle, ¢er);
|
||||
|
||||
bool
|
||||
Point::coincides_with(point_sv)
|
||||
SV* point_sv;
|
||||
CODE:
|
||||
Point point;
|
||||
perl2point_check(point_sv, point);
|
||||
RETVAL = THIS->coincides_with(&point);
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
%}
|
||||
|
||||
};
|
||||
|
||||
%package{Slic3r::Point::XS};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue