Implement randomness at the placement datatype level

This commit is contained in:
2021-11-04 18:13:19 +00:00
parent f0c56cbcac
commit 92026bf06a
7 changed files with 39 additions and 6 deletions
+1
View File
@@ -39,6 +39,7 @@ data Placement = Placement
, _idPlacement :: Int -> Maybe Placement
}
| PlacementUsingPos Point3 (Point3 -> Placement) -- allows a placement to use a shifted position
| RandomPlacement {_unRandomPlacement :: State StdGen Placement}
sPS :: Point2 -> Float -> PSType -> Placement
sPS p a pt = Placement (PS p a) pt (const Nothing)