Performance improvements, combine cap and geometry buffer
This commit is contained in:
@@ -24,6 +24,7 @@ import Picture.Data
|
||||
import Tile
|
||||
import Polyhedra
|
||||
import Polyhedra.Data
|
||||
import Shape
|
||||
|
||||
import Control.Monad.State
|
||||
import Control.Lens
|
||||
@@ -78,6 +79,11 @@ setupWorldBounds w = w
|
||||
|
||||
setupForegroundEdgeVerxs :: World -> World
|
||||
setupForegroundEdgeVerxs w = w & foregroundEdgeVerx .~ polyhedrasToEdges (_foregroundDecorations w)
|
||||
& foregroundShape .~ Shape vs es
|
||||
where
|
||||
vs = shVfromList $ concatMap (polyToTris . map toShape) $ concatMap _pyFaces $ _foregroundDecorations w
|
||||
es = shEfromList $ polyhedrasToEdges (_foregroundDecorations w)
|
||||
toShape (p3,p4) = ShapeV p3 p4
|
||||
|
||||
polyhedrasToEdges :: [Polyhedra] -> [Point3]
|
||||
polyhedrasToEdges = concatMap tflat4 . concatMap polyToEdges
|
||||
|
||||
Reference in New Issue
Block a user