Cleanup
This commit is contained in:
@@ -41,12 +41,12 @@ worldSPic cfig w =
|
||||
<> foldMap mcSPic (filtOn _mcPos _machines)
|
||||
where
|
||||
filtOn f g = IM.filter (pointIsClose . f) (g w)
|
||||
--pointIsClose p = dist camCen p < _viewDistance w
|
||||
pointIsClose = cullPoint w
|
||||
--camCen = _cameraCenter w
|
||||
pointIsClose = cullPoint cfig w
|
||||
|
||||
cullPoint :: World -> Point2 -> Bool
|
||||
cullPoint w p = pointInPolygon p (_boundBox w)
|
||||
cullPoint :: Configuration -> World -> Point2 -> Bool
|
||||
cullPoint cfig w p
|
||||
| debugOn Close_shape_culling cfig = pointInPolygon p (_boundBox w)
|
||||
| otherwise = dist (_cameraCenter w) p < _viewDistance w
|
||||
|
||||
extraShapes :: World -> Shape
|
||||
extraShapes = _foregroundShape
|
||||
@@ -69,9 +69,15 @@ extraPics cfig w = pictures (_decorations w)
|
||||
<> drawWallIDs cfig w
|
||||
<> drawPathing cfig w
|
||||
<> drawCrInfo cfig w
|
||||
<> drawBoundingBox cfig w
|
||||
|
||||
testPic :: Configuration -> World -> Picture
|
||||
testPic cfig w = setLayer DebugLayer $ color green $ line $ (x:xs) ++ [x]
|
||||
testPic _ _ = mempty
|
||||
|
||||
drawBoundingBox :: Configuration -> World -> Picture
|
||||
drawBoundingBox cfig w
|
||||
| debugOn Show_bound_box cfig = setLayer DebugLayer $ color green $ line $ (x:xs) ++ [x]
|
||||
| otherwise = mempty
|
||||
where
|
||||
(x:xs) = cullBox cfig w
|
||||
|
||||
|
||||
Reference in New Issue
Block a user