Refactor more collisions to use streaming
This commit is contained in:
@@ -232,8 +232,9 @@ farWallDistDirection p w = runIdentity $ L.purely S.fold_ ((,,,)
|
||||
)
|
||||
$ S.map f vps
|
||||
where
|
||||
f q = rotateV (negate $ _cameraRot w)
|
||||
$ runIdentity (L.purely S.fold_ (collidePointWallsL p q) (S.filter wlIsOpaque $ wallsAlongLineStream p q w)) -.- p
|
||||
f q = runIdentity (S.fold_ findPoint q (rotateV (negate $ _cameraRot w) . (-.- p)) (wls q))
|
||||
wls q = S.filter wlIsOpaque $ wallsAlongLineStream p q w
|
||||
findPoint q = fromMaybe q . uncurry (intersectSegSeg p q) . _wlLine
|
||||
vps = streamViewpoints p w
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user