Keep track of seen walls in external list

This commit is contained in:
2023-01-03 22:36:44 +00:00
parent 5b4e8d75bb
commit 0b7da0489a
10 changed files with 30 additions and 727 deletions
-14
View File
@@ -142,20 +142,6 @@ allVisibleWalls w = concatMap (flip (visibleWalls vPos) w . (+.+ vPos)) $ nRays
where
vPos = w ^. cWorld . camPos . camViewFrom
--allVisibleWalls :: World -> StreamOf (Point2,Wall)
--{-# INLINE allVisibleWalls #-}
--allVisibleWalls w = concats $ S.subst (flip (visibleWalls vPos) w . (+.+ vPos)) $ S.each (nRays 20)
-- where
-- vPos = _cameraViewFrom w
--overlapCircWalls :: Point2 -> Float -> StreamOf Wall
-- -> StreamOf (Point2,Wall)
--{-# INLINE overlapCircWalls #-}
--overlapCircWalls p r = S.mapMaybe dointersect
-- where
-- dointersect wl = f (_wlLine wl) <&> (,wl)
-- f (a,b) = intersectSegSeg p (p +.+ r *.* normalizeV ((0.5 *.* (a +.+ b)) -.- p)) a b
overlapCircWalls ::
Point2 ->
Float ->