Nub close points for game room boundaries

This commit is contained in:
2021-10-04 09:39:18 +01:00
parent df9a8ea242
commit c8e08d903e
8 changed files with 67 additions and 95 deletions
+3 -3
View File
@@ -66,7 +66,7 @@ shiftRoomBy :: (Point2,Float) -> Room -> Room
shiftRoomBy shift r = r
& rmPolys %~ fmap (map (shiftPointBy shift))
& rmLinks %~ fmap (shiftLinkBy shift)
& rmPath %~ map (shiftPathPointBy shift)
& rmPath %~ map (shiftPathBy shift)
& rmBound %~ fmap (map (shiftPointBy shift))
& rmShift %~ shiftLinkBy shift
& rmFloor %~ map
@@ -82,8 +82,8 @@ shiftLinkBy
-> (Point2,Float)
shiftLinkBy (pos,rot) (p,r) = (shiftPointBy (pos,rot) p, r + rot)
shiftPathPointBy
shiftPathBy
:: (Point2,Float)
-> (Point2,Point2)
-> (Point2,Point2)
shiftPathPointBy s (p1,p2) = (shiftPointBy s p1, shiftPointBy s p2)
shiftPathBy s (p1,p2) = (shiftPointBy s p1, shiftPointBy s p2)