|
@@ -13,7 +13,7 @@ our @EXPORT_OK = qw(
|
|
|
point_along_segment polygon_segment_having_point polygon_has_subsegment
|
|
|
deg2rad rad2deg
|
|
|
rotate_points move_points
|
|
|
- dot perp polygon_points_visibility
|
|
|
+ dot perp
|
|
|
line_intersection bounding_box bounding_box_intersect
|
|
|
angle3points
|
|
|
chained_path chained_path_from collinear scale unscale
|
|
@@ -291,19 +291,6 @@ sub perp {
|
|
|
return $u->[X] * $v->[Y] - $u->[Y] * $v->[X];
|
|
|
}
|
|
|
|
|
|
-sub polygon_points_visibility {
|
|
|
- my ($polygon, $p1, $p2) = @_;
|
|
|
-
|
|
|
- my $our_line = [ $p1, $p2 ];
|
|
|
- foreach my $line (polygon_lines($polygon)) {
|
|
|
- my $intersection = line_intersection($our_line, $line, 1) // next;
|
|
|
- next if grep points_coincide($intersection, $_), $p1, $p2;
|
|
|
- return 0;
|
|
|
- }
|
|
|
-
|
|
|
- return 1;
|
|
|
-}
|
|
|
-
|
|
|
sub line_intersects_any {
|
|
|
my ($line, $lines) = @_;
|
|
|
for (@$lines) {
|