Attach terminal to analyser (these should rather be combined)

This commit is contained in:
2022-03-21 19:20:58 +00:00
parent 51cc04799d
commit 9c46027711
11 changed files with 92 additions and 47 deletions
+5 -1
View File
@@ -1,15 +1,19 @@
module Dodge.Placement.Shift
( shiftPlacement
, shiftPSBy
, shiftRelativeToPS
) where
import Dodge.LevelGen.Data
import Dodge.ShiftPoint
import LensHelp
import Geometry
import Control.Lens
shiftPSBy :: (Point2,Float) -> PlacementSpot -> PlacementSpot
shiftPSBy (pos,rot) ps = ps
& psPos %~ shiftPointBy (pos,rot)
& psRot +~ rot
shiftRelativeToPS :: Point2 -> PlacementSpot -> PlacementSpot
shiftRelativeToPS p ps = ps & psPos .+.+~ rotateV (_psRot ps) p
shiftPlacement :: (Point2,Float) -> Placement -> Placement
shiftPlacement shift plmnt = case plmnt of
-- slightly messy NoShiftCont, necessary to stop interference with ps0jPushPS