Simplify analyser machines somewhat

This commit is contained in:
2025-09-16 21:41:26 +01:00
parent 203919933c
commit 81d6727d8e
21 changed files with 418 additions and 464 deletions
+3 -9
View File
@@ -44,15 +44,9 @@ linksAndPath lnks subpth = S.fromList subpth <> foldMap linkClosest lnks
linksAndPath' :: [RoomLink] -> [(Point2, Point2)] -> S.Set (Point2, Point2)
linksAndPath' = linksAndPath . map lnkPosDir
testCrossWalls ::
[(Point2, Point2)] ->
(Point2, Point2) ->
Bool
testCrossWalls :: [(Point2, Point2)] -> (Point2, Point2) -> Bool
testCrossWalls wls (a, b) = not $ any (isJust . uncurry (intersectSegSeg a b)) wls
--extra test whether both members of the path edge are in some poly
pairInPolys ::
[[Point2]] ->
(Point2, Point2) ->
Bool
pairInPolys polys (a, b) = any (pointInPolygon a) polys && any (pointInPolygon b) polys
pairInPolys :: [[Point2]] -> (Point2, Point2) -> Bool
pairInPolys polys (a, b) = any (pointInPoly a) polys && any (pointInPoly b) polys