Correct room link position numbering
This commit is contained in:
@@ -18,17 +18,22 @@ atFstLnkOut = PSPos f (const id) Nothing
|
||||
f (OutLink 0 p a) = Just (PS p a, OutLink 0 p a)
|
||||
f _ = Nothing
|
||||
|
||||
atFstLnkOutShiftBy :: ((Point2,Float) -> (Point2,Float))
|
||||
-> PlacementSpot
|
||||
atFstLnkOutShiftBy theshift = PSPos f (const id) Nothing
|
||||
atNthLnkOutShiftBy :: Int -> ((Point2,Float) -> (Point2,Float)) -> PlacementSpot
|
||||
atNthLnkOutShiftBy n theshift = PSPos f (const id) Nothing
|
||||
where
|
||||
f (OutLink 0 p a) = Just (PS p' a', OutLink 0 p a)
|
||||
f (OutLink i p a) | n == i = Just (PS p' a', OutLink n p a)
|
||||
where
|
||||
(p',a') = theshift (p,a)
|
||||
f _ = Nothing
|
||||
|
||||
atFstLnkOutShiftBy :: ((Point2,Float) -> (Point2,Float)) -> PlacementSpot
|
||||
atFstLnkOutShiftBy = atNthLnkOutShiftBy 0
|
||||
|
||||
atFstLnkOutShiftInward :: Float -> PlacementSpot
|
||||
atFstLnkOutShiftInward x = atFstLnkOutShiftBy f
|
||||
atFstLnkOutShiftInward = atNthLnkOutShiftInward 0
|
||||
|
||||
atNthLnkOutShiftInward ::Int -> Float -> PlacementSpot
|
||||
atNthLnkOutShiftInward n x = atNthLnkOutShiftBy n f
|
||||
where
|
||||
f (p,a) = (p +.+ rotateV a (V2 0 (negate x)),a)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user