Move streaming data into its own file
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user