Attach terminal to analyser (these should rather be combined)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user