Add lenses for SPic and MountedObject positions

This commit is contained in:
2026-03-29 16:38:48 +01:00
parent d278083947
commit 00999f5921
4 changed files with 28 additions and 13 deletions
+9
View File
@@ -1,7 +1,16 @@
module ShapePicture.Data where
import Control.Lens
import Data.Strict.Tuple
import Geometry.Data
import Picture.Data
import Shape.Data
type SPic = Pair Shape Picture
spPos :: ASetter' SPic Point3
spPos f x =
Identity $
x
& _1 . each . sfVs . each %~ (runIdentity . f)
& _2 . each . vxPos %~ (runIdentity . f)