Simplify clouds
This commit is contained in:
@@ -44,6 +44,7 @@ makeIntInterval x y
|
||||
-- [V2 x y | x <- makeIntInterval x1 x2, y <- makeIntInterval y1 y2]
|
||||
|
||||
zoneOfPoint :: Float -> Point2 -> Int2
|
||||
{-# INLINE zoneOfPoint #-}
|
||||
zoneOfPoint = fmap . divTo
|
||||
|
||||
zoneOfSeg :: Float -> Point2 -> Point2 -> [Int2]
|
||||
|
||||
+24
-18
@@ -1,22 +1,28 @@
|
||||
module Dodge.Zoning.Cloud where
|
||||
module Dodge.Zoning.Cloud (
|
||||
clsNearPoint,
|
||||
zoneCloud,
|
||||
zoneDust,
|
||||
dssNearPoint,
|
||||
) where
|
||||
|
||||
import Dodge.Data.World
|
||||
import Dodge.Zoning.Base
|
||||
import Dodge.Zoning.Common
|
||||
import Geometry
|
||||
import qualified IntMapHelp as IM
|
||||
import Dodge.Zoning.Common
|
||||
|
||||
clsNearPoint :: Point2 -> World -> [Cloud]
|
||||
{-# INLINE clsNearPoint #-}
|
||||
clsNearPoint = nearPoint clZoneSize _clZoning
|
||||
|
||||
clsNearSeg :: Point2 -> Point2 -> World -> [Cloud]
|
||||
clsNearSeg = nearSeg clZoneSize _clZoning
|
||||
|
||||
clsNearRect :: Point2 -> Point2 -> World -> [Cloud]
|
||||
clsNearRect = nearRect clZoneSize _clZoning
|
||||
|
||||
clsNearCirc :: Point2 -> Float -> World -> [Cloud]
|
||||
clsNearCirc p r = clsNearRect (p +.+ V2 r r) (p -.- V2 r r)
|
||||
--clsNearSeg :: Point2 -> Point2 -> World -> [Cloud]
|
||||
--clsNearSeg = nearSeg clZoneSize _clZoning
|
||||
--
|
||||
--clsNearRect :: Point2 -> Point2 -> World -> [Cloud]
|
||||
--clsNearRect = nearRect clZoneSize _clZoning
|
||||
--
|
||||
--clsNearCirc :: Point2 -> Float -> World -> [Cloud]
|
||||
--clsNearCirc p r = clsNearRect (p +.+ V2 r r) (p -.- V2 r r)
|
||||
|
||||
clZoneSize :: Float
|
||||
clZoneSize = 20
|
||||
@@ -30,14 +36,14 @@ zoneCloud cl = zoneMonoid (zoneOfCl cl) [cl]
|
||||
dssNearPoint :: Point2 -> World -> [Dust]
|
||||
dssNearPoint = nearPoint dsZoneSize _dsZoning
|
||||
|
||||
dssNearSeg :: Point2 -> Point2 -> World -> [Dust]
|
||||
dssNearSeg = nearSeg dsZoneSize _dsZoning
|
||||
|
||||
dssNearRect :: Point2 -> Point2 -> World -> [Dust]
|
||||
dssNearRect = nearRect dsZoneSize _dsZoning
|
||||
|
||||
dssNearCirc :: Point2 -> Float -> World -> [Dust]
|
||||
dssNearCirc p r = dssNearRect (p +.+ V2 r r) (p -.- V2 r r)
|
||||
--dssNearSeg :: Point2 -> Point2 -> World -> [Dust]
|
||||
--dssNearSeg = nearSeg dsZoneSize _dsZoning
|
||||
--
|
||||
--dssNearRect :: Point2 -> Point2 -> World -> [Dust]
|
||||
--dssNearRect = nearRect dsZoneSize _dsZoning
|
||||
--
|
||||
--dssNearCirc :: Point2 -> Float -> World -> [Dust]
|
||||
--dssNearCirc p r = dssNearRect (p +.+ V2 r r) (p -.- V2 r r)
|
||||
|
||||
dsZoneSize :: Float
|
||||
dsZoneSize = 20
|
||||
|
||||
Reference in New Issue
Block a user