Merge branch 'master' into grow-narrow

This commit is contained in:
Alessandro Ranellucci 2013-03-16 20:09:11 +01:00
commit 38b79c6bf7
18 changed files with 152 additions and 66 deletions

View file

@ -82,12 +82,22 @@ sub group {
sub offset {
my $self = shift;
return map {
(ref $self)->new(
expolygon => $_,
map { $_ => $self->$_ } qw(surface_type depth_layers bridge_angle),
)
} $self->expolygon->offset_ex(@_);
return map $self->_inflate_expolygon($_), $self->expolygon->offset_ex(@_);
}
sub simplify {
my $self = shift;
return map $self->_inflate_expolygon($_), $self->expolygon->simplify(@_);
}
sub _inflate_expolygon {
my $self = shift;
my ($expolygon) = @_;
return (ref $self)->new(
expolygon => $expolygon,
map { $_ => $self->$_ } qw(surface_type depth_layers bridge_angle),
);
}
sub p {