Keep track of seen walls in external list
This commit is contained in:
@@ -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 ->
|
||||
|
||||
Reference in New Issue
Block a user