Add lenses for SPic and MountedObject positions
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user