Add more procedural girders

This commit is contained in:
2022-03-16 18:02:17 +00:00
parent 6e05756ed3
commit 58a24c58e3
18 changed files with 150 additions and 123 deletions
+3 -11
View File
@@ -25,6 +25,7 @@ module Dodge.PlacementSpot
, shiftInBy
, resetPLUse
, psposAddLabel
, shiftByV2
) where
import Dodge.LevelGen.Data
import Geometry
@@ -192,17 +193,8 @@ atNthLnkOutShiftInward n x = atNthLnkOutShiftBy n
shiftInBy :: Float -> (Point2,Float) -> (Point2,Float)
shiftInBy x (p,a) = (p +.+ rotateV a (V2 0 (negate x)),a)
--anyLnkInPS :: Float -- ^ amount to shift inward
-- -> PlacementSpot
--anyLnkInPS x = PSPos f (const id) Nothing
-- where
-- f rp _ = case _rpLinkStatus rp of
-- UnusedLink {} -> Just (PS v' a', rp & rpPlacementUse +~ 1)
-- _ -> Nothing
-- where
-- a = _rpDir rp
-- v' = _rpPos rp -.- x *.* unitVectorAtAngle (a + 0.5 * pi)
-- a' = a + pi
shiftByV2 :: Point2 -> (Point2,Float) -> (Point2,Float)
shiftByV2 x (p,a) = (p +.+ rotateV a x,a)
-- this should probably check the placement use, but so should others: should
-- unify these