Fix bug in the placement of mounted lightsources when shifted

This commit is contained in:
2022-03-04 17:59:42 +00:00
parent d219f42640
commit 8fa6bbfe29
4 changed files with 17 additions and 39 deletions
+3 -1
View File
@@ -13,7 +13,9 @@ shiftPSBy (pos,rot) ps = ps
shiftPlacement :: (Point2,Float) -> Placement -> Placement
shiftPlacement shift plmnt = case plmnt of
Placement {} -> plmnt & plSpot %~ shiftPSBy shift
& plIDCont %~ fmap (fmap $ shiftPlacement shift)
-- TODO check whether the following continuation is ever necessary
-- it can interfere with ps0jPushPS
-- & plIDCont %~ fmap (fmap $ shiftPlacement shift)
PlacementUsingPos p f -> PlacementUsingPos (shiftPoint3By shift p)
(fmap (shiftPlacement shift) f)
RandomPlacement rpl -> RandomPlacement $ fmap (shiftPlacement shift) rpl