Simplify analyser machines somewhat
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user