Working element buffer object

This commit is contained in:
2021-09-20 12:36:35 +01:00
parent c605ac74ff
commit 5cbcbec101
22 changed files with 242 additions and 212 deletions
+2 -3
View File
@@ -79,11 +79,10 @@ setupWorldBounds w = w
setupForegroundEdgeVerxs :: World -> World
setupForegroundEdgeVerxs w = w & foregroundEdgeVerx .~ polyhedrasToEdges (_foregroundDecorations w)
& foregroundShape .~ Shape vs es
& foregroundShape .~ (vs,es)
where
vs = shVfromList $ concatMap (polyToTris . map toShape) $ concatMap _pyFaces $ _foregroundDecorations w
vs = shVfromList $ map pairToSV $ concatMap polyToTris $ concatMap _pyFaces $ _foregroundDecorations w
es = shEfromList $ polyhedrasToEdges (_foregroundDecorations w)
toShape (p3,p4) = ShapeV p3 p4
polyhedrasToEdges :: [Polyhedra] -> [Point3]
polyhedrasToEdges = concatMap tflat4 . concatMap polyToEdges