Attempt to stop reuse of link placement spots

This commit is contained in:
2021-11-09 17:00:42 +00:00
parent 28f8ac1fbd
commit 5b09c9aa37
7 changed files with 121 additions and 81 deletions
+8 -4
View File
@@ -23,11 +23,15 @@ shiftRoomTreeSearchAll
-> Seq (Tree Room) -- ^ Rooms to be added
-> [[Room]]
shiftRoomTreeSearchAll _ Empty = [[]]
shiftRoomTreeSearchAll bs (Node r ts :<| ts')
| roomIsClipping = [] -- this is called too often, but whatever
shiftRoomTreeSearchAll bs (Node r ts :<| tseq)
| roomIsClipping = [] -- this is called too often--might get memoized?
| otherwise = case ts of
[] -> (r :) <$> shiftRoomTreeSearchAll newBounds ts'
(s:ss) -> concatMap (\l -> shiftRoomTreeSearchAll bs (Node (useLink l) ss <| (ts' |> f l s))) ls
[] -> (r :) <$> shiftRoomTreeSearchAll newBounds tseq
(s:ss) -> concatMap (\l -> shiftRoomTreeSearchAll bs (Node (useLink l) ss <| (tseq |> f l s))) ls
-- = case ts of
-- [] | roomIsClipping -> []
-- [] -> (r :) <$> shiftRoomTreeSearchAll newBounds tseq
-- (s:ss) -> concatMap (\l -> shiftRoomTreeSearchAll bs (Node (useLink l) ss <| (tseq |> f l s))) ls
where
convexBounds = map pointsToPoly $ _rmBound r
ls = init $ _rmLinks r