Move streaming data into its own file

This commit is contained in:
2022-06-29 08:05:20 +01:00
parent b1a7e1bf35
commit 5501d6f9b5
12 changed files with 25 additions and 38 deletions
-1
View File
@@ -2,7 +2,6 @@ module Dodge.Zone.Object where
import Dodge.Data
import Geometry.Zone
import Geometry.Data
import Geometry.Vector3D
import StreamingHelp
import qualified Streaming.Prelude as S
+2 -2
View File
@@ -6,8 +6,8 @@ import qualified Data.IntMap.Strict as IM
import Geometry
import LensHelp
insertInZoning :: Monoid (t a) => (a -> t a -> t a) -> a -> Zoning t a -> Zoning t a
insertInZoning f obj zn = runIdentity (S.fold_ doinsert zn id (_znFunc zn (_znSize zn) obj))
updateZoning :: Monoid (t a) => (a -> t a -> t a) -> a -> Zoning t a -> Zoning t a
updateZoning f obj zn = runIdentity (S.fold_ doinsert zn id (_znFunc zn (_znSize zn) obj))
where
doinsert znobs vxy = insertInZoneWith vxy (\_ -> f obj) (f obj mempty) znobs