Continue shape rendering improvements

This commit is contained in:
2021-09-21 02:04:41 +01:00
parent 464b0b16db
commit 2804d58a5a
12 changed files with 20 additions and 73 deletions
+1 -6
View File
@@ -24,7 +24,6 @@ import Picture.Data
import Tile
import Polyhedra
import Polyhedra.Data
import Shape
import Control.Monad.State
import Control.Lens
@@ -78,11 +77,7 @@ setupWorldBounds w = w
) ps
setupForegroundEdgeVerxs :: World -> World
setupForegroundEdgeVerxs w = w & foregroundEdgeVerx .~ polyhedrasToEdges (_foregroundDecorations w)
& foregroundShape .~ ([ShapeObj ListV vs],es)
where
vs = shVfromList $ map pairToSV $ concatMap polyToTris $ concatMap _pyFaces $ _foregroundDecorations w
es = shEfromList $ polyhedrasToEdges (_foregroundDecorations w)
setupForegroundEdgeVerxs w = w & foregroundShape .~ (_foregroundDecorations w)
polyhedrasToEdges :: [Polyhedra] -> [Point3]
polyhedrasToEdges = concatMap tflat4 . concatMap polyToEdges