Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/supermerill/SuperSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbubnikv <bubnikv@gmail.com>2016-09-13 14:30:00 +0300
committerbubnikv <bubnikv@gmail.com>2016-09-13 14:30:00 +0300
commit620c6c7378c4799980f63794669548c104b9bcea (patch)
treefc7aea3342539018bb19d27abd1144956eb00b4d /xs/xsp/Point.xsp
parenta5b7f14dfa291039fd6971a356efd011fab84440 (diff)
Ported from the playground branch. Various documentation and optimization.
Diffstat (limited to 'xs/xsp/Point.xsp')
-rw-r--r--xs/xsp/Point.xsp4
1 files changed, 4 insertions, 0 deletions
diff --git a/xs/xsp/Point.xsp b/xs/xsp/Point.xsp
index 60a4864e3..e1467143c 100644
--- a/xs/xsp/Point.xsp
+++ b/xs/xsp/Point.xsp
@@ -49,6 +49,7 @@
%code{% RETVAL = new Point(THIS->negative()); %};
bool coincides_with_epsilon(Point* point)
%code{% RETVAL = THIS->coincides_with_epsilon(*point); %};
+ std::string serialize() %code{% char buf[2048]; sprintf(buf, "%d,%d", THIS->x, THIS->y); RETVAL = buf; %};
%{
@@ -86,6 +87,7 @@ Point::coincides_with(point_sv)
%code{% RETVAL = THIS->y; %};
long z()
%code{% RETVAL = THIS->z; %};
+ std::string serialize() %code{% char buf[2048]; sprintf(buf, "%d,%d,%d", THIS->x, THIS->y, THIS->z); RETVAL = buf; %};
};
%name{Slic3r::Pointf} class Pointf {
@@ -113,6 +115,7 @@ Point::coincides_with(point_sv)
%code{% RETVAL = THIS->negative(); %};
Clone<Pointf> vector_to(Pointf* point)
%code{% RETVAL = THIS->vector_to(*point); %};
+ std::string serialize() %code{% char buf[2048]; sprintf(buf, "%lf,%lf", THIS->x, THIS->y); RETVAL = buf; %};
};
%name{Slic3r::Pointf3} class Pointf3 {
@@ -140,4 +143,5 @@ Point::coincides_with(point_sv)
%code{% RETVAL = THIS->negative(); %};
Clone<Pointf3> vector_to(Pointf3* point)
%code{% RETVAL = THIS->vector_to(*point); %};
+ std::string serialize() %code{% char buf[2048]; sprintf(buf, "%lf,%lf,%lf", THIS->x, THIS->y, THIS->z); RETVAL = buf; %};
};