Revert "Simplify clouds"

This reverts commit bd50262ca4.
This commit is contained in:
2025-12-02 21:26:28 +00:00
parent 5d0fc10372
commit 5dbb67349b
5 changed files with 50 additions and 33 deletions
-1
View File
@@ -44,7 +44,6 @@ 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]
+18 -24
View File
@@ -1,28 +1,22 @@
module Dodge.Zoning.Cloud (
clsNearPoint,
zoneCloud,
zoneDust,
dssNearPoint,
) where
module Dodge.Zoning.Cloud 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
@@ -36,14 +30,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