Make zoning more universal
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
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
|
||||
|
||||
zoneOfCreature :: Float -> Creature -> StreamOf Int2
|
||||
zoneOfCreature x cr = zoneInsideCirc x (_crPos cr) (_crRad cr)
|
||||
|
||||
zoneOfWall :: Float -> Wall -> StreamOf Int2
|
||||
zoneOfWall x = uncurry (zoneOfSeg x) . _wlLine
|
||||
|
||||
zonePos :: (a -> Point2) -> Float -> a -> StreamOf Int2
|
||||
zonePos f x = S.yield . zoneOfPoint x . f
|
||||
Reference in New Issue
Block a user