Fix integration of XS containers

This commit is contained in:
Alessandro Ranellucci 2013-07-16 17:13:01 +02:00
parent 9b582a11ff
commit 9458c7db97
34 changed files with 279 additions and 152 deletions

View file

@ -54,7 +54,7 @@ sub remove_acute_vertices {
sub encloses_point {
my $self = shift;
my ($point) = @_;
return Boost::Geometry::Utils::point_covered_by_polygon($point->arrayref, [$self->pp]);
return Boost::Geometry::Utils::point_covered_by_polygon($point->pp, [$self->pp]);
}
sub area {
@ -138,9 +138,10 @@ sub split_at {
sub concave_points {
my $self = shift;
my @points = @{$self->pp};
return map $self->[$_],
grep Slic3r::Geometry::angle3points(@$self[$_, $_-1, $_+1]) < PI - epsilon,
-1 .. ($#$self-1);
grep Slic3r::Geometry::angle3points(@points[$_, $_-1, $_+1]) < PI - epsilon,
-1 .. ($#points-1);
}
1;