Work towards allowing for children to attach to arbitrary link types
This commit is contained in:
@@ -54,13 +54,16 @@ posRms bounds parenti@(parent,_) ( (numChild,t@(Node childi _) ):its) tseq = do
|
||||
newBounds = map pointsToPoly $ _rmBound r'
|
||||
clipping = or (convexPolysOverlap <$> newBounds <*> bounds)
|
||||
updateparent rm = doLnkEff (lnkPosDir outlnk) $ rm
|
||||
& rmLinks %~ delete outlnk & rmPos %~ (uncurry (UsedOutLink numChild (snd childi)) (lnkPosDir outlnk) :)
|
||||
& rmLinks %~ delete outlnk
|
||||
& rmPos %~ (uncurry (UsedOutLink numChild (snd childi)) (lnkPosDir outlnk) :)
|
||||
shiftedoutlink = shiftLinkBy (_rmShift parent) outlnk
|
||||
r' = doRoomShift . fst $ rootLabel shiftedt
|
||||
updatechild rm = rm & rmLinks %~ delete il
|
||||
updatechild rm = rm
|
||||
& rmLinks %~ delete il
|
||||
& rmPos %~ ( (uncurry (UsedInLink 0) (lnkPosDir il):)
|
||||
. (map (uncurry UnusedLink . lnkPosDir) (delete il (_rmLinks rm)) ++) )
|
||||
shiftedt = applyToRoot (first $ updatechild . shiftRoomShiftToLink (lnkPosDir shiftedoutlink) (lnkPosDir il)) t
|
||||
shiftedt = applyToRoot
|
||||
(first $ updatechild . shiftRoomShiftToLink (lnkPosDir shiftedoutlink) (lnkPosDir il)) t
|
||||
|
||||
zipCount :: [a] -> [(Int,a)]
|
||||
zipCount = Prelude.zip [0..]
|
||||
|
||||
Reference in New Issue
Block a user