Add xsp wrapper for Pointf class.
This commit is contained in:
parent
e005ff32c4
commit
ad03a88733
3 changed files with 17 additions and 1 deletions
|
@ -28,6 +28,11 @@ our @ISA = 'Slic3r::Point';
|
||||||
|
|
||||||
sub DESTROY {}
|
sub DESTROY {}
|
||||||
|
|
||||||
|
package Slic3r::Pointf;
|
||||||
|
use overload
|
||||||
|
'@{}' => sub { [ $_[0]->x, $_[0]->y ] }, #,
|
||||||
|
'fallback' => 1;
|
||||||
|
|
||||||
package Slic3r::Pointf3;
|
package Slic3r::Pointf3;
|
||||||
use overload
|
use overload
|
||||||
'@{}' => sub { [ $_[0]->x, $_[0]->y, $_[0]->z ] }, #,
|
'@{}' => sub { [ $_[0]->x, $_[0]->y, $_[0]->z ] }, #,
|
||||||
|
|
|
@ -56,6 +56,17 @@ Point::coincides_with(point_sv)
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
%name{Slic3r::Pointf} class Pointf {
|
||||||
|
Pointf(double _x = 0, double _y = 0);
|
||||||
|
~Pointf();
|
||||||
|
Clone<Pointf> clone()
|
||||||
|
%code{% RETVAL = THIS; %};
|
||||||
|
double x()
|
||||||
|
%code{% RETVAL = THIS->x; %};
|
||||||
|
double y()
|
||||||
|
%code{% RETVAL = THIS->y; %};
|
||||||
|
};
|
||||||
|
|
||||||
%name{Slic3r::Pointf3} class Pointf3 {
|
%name{Slic3r::Pointf3} class Pointf3 {
|
||||||
Pointf3(double _x = 0, double _y = 0, double _z = 0);
|
Pointf3(double _x = 0, double _y = 0, double _z = 0);
|
||||||
~Pointf3();
|
~Pointf3();
|
||||||
|
|
Loading…
Reference in a new issue