Some code cleanup in MotionPlanner

This commit is contained in:
Alessandro Ranellucci 2013-05-17 20:03:38 +02:00
parent ba433822b6
commit e33ca54943
2 changed files with 36 additions and 28 deletions

View file

@ -172,4 +172,10 @@ sub split_at_first_point {
return $self->split_at_index(0);
}
sub intersects_line {
my $self = shift;
my ($line) = @_;
return @{Boost::Geometry::Utils::polygon_multi_linestring_intersection([$self], [$line])} > 0;
}
1;