mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-20 23:31:13 -06:00
XS interface completed, including new Line class
This commit is contained in:
parent
9af2a1c007
commit
ab6b3d41a7
33 changed files with 435 additions and 257 deletions
30
xs/xsp/Line.xsp
Normal file
30
xs/xsp/Line.xsp
Normal file
|
@ -0,0 +1,30 @@
|
|||
%module{Slic3r::XS};
|
||||
|
||||
%{
|
||||
#include <myinit.h>
|
||||
#include "Line.hpp"
|
||||
%}
|
||||
|
||||
%name{Slic3r::Line} class Line {
|
||||
~Line();
|
||||
Line* clone()
|
||||
%code{% const char* CLASS = "Slic3r::Line"; RETVAL = new Line(*THIS); %};
|
||||
SV* arrayref()
|
||||
%code{% RETVAL = THIS->to_SV(); %};
|
||||
SV* pp()
|
||||
%code{% RETVAL = THIS->to_SV_pureperl(); %};
|
||||
void reverse();
|
||||
%{
|
||||
|
||||
Line*
|
||||
Line::new(...)
|
||||
CODE:
|
||||
RETVAL = new Line ();
|
||||
// ST(0) is class name, ST(1) and ST(2) are endpoints
|
||||
RETVAL->a.from_SV_check( ST(1) );
|
||||
RETVAL->b.from_SV_check( ST(2) );
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
%}
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue