Cleanup
This commit is contained in:
@@ -43,7 +43,7 @@ lineOnScreenCone cfig w p1 p2 = pointInPolygon p1 sp
|
||||
sps = zip sp (tail sp ++ [head sp])
|
||||
|
||||
pointOnScreen :: Configuration -> World -> Point2 -> Bool
|
||||
pointOnScreen cfig w p = pointInPolygon p . reverse $ screenPolygon cfig w
|
||||
pointOnScreen cfig w p = pointInPolygon p $ screenPolygon cfig w
|
||||
|
||||
drawWallFace :: Configuration -> World -> Wall -> Picture
|
||||
drawWallFace cfig w wall
|
||||
@@ -58,7 +58,7 @@ extendConeToScreenEdge :: Configuration -> World -> Point2 -> (Point2,Point2) ->
|
||||
extendConeToScreenEdge cfig w c (x,y) = orderPolygon $ wallScreenIntersect ++ [x,y] ++ borderPs ++ cornerPs
|
||||
where
|
||||
borderPs = mapMaybe (intersectLinefromScreen cfig w c) [x,y]
|
||||
scpoly = screenPolygon cfig w
|
||||
scpoly = reverse $ screenPolygon cfig w
|
||||
cornerPs = filter (pointIsInCone c (x,y)) scpoly
|
||||
wallScreenIntersect = mapMaybe (uncurry $ intersectSegSeg y ((2*.*y) -.- x))
|
||||
. loopPairs $ scpoly
|
||||
|
||||
Reference in New Issue
Block a user