Move towards removal of ssaTri, which was buggy

This commit is contained in:
2021-12-15 12:00:07 +00:00
parent c5a211afce
commit dccacd9d22
7 changed files with 57 additions and 70 deletions
+1 -6
View File
@@ -124,14 +124,9 @@ thingsHitLongLine sp ep w
where
crs = mapMaybe
(\cr -> (,Left cr) <$> listToMaybe (intersectCircSeg (_crPos cr) (_crRad cr) sp ep))
. IM.elems $ _creatures w
--crs = zip crPs (map Left hitCrs)
hitCrs = IM.elems
. IM.filter (\cr -> circOnSeg sp ep (_crPos cr) (_crRad cr))
. IM.elems
$ _creatures w
-- $ creaturesAlongLine sp ep w
crPs = map (\cr -> ssaTriPoint ep (_crPos cr) sp (_crRad cr)) hitCrs
--crPs = map _crPos hitCrs
wls = zip (map (fromJust . hitPoint) hitWls) (map Right hitWls)
--hitWls = wallsOnLine sp ep $ wallsAlongLine sp ep w
hitWls = wallsOnLine sp ep $ _walls w