Reduce rendertype down to vertex information

This commit is contained in:
2021-07-27 13:35:43 +02:00
parent d27c5e7ff4
commit ae84f44824
14 changed files with 225 additions and 189 deletions
+3 -4
View File
@@ -85,11 +85,10 @@ boxABC a b c =
polyToPics :: Polyhedra -> [Picture]
polyToPics = map helpPoly3D . _pyFaces
helpPoly3D :: [(Point3, Point4)] -> [(Int, RenderType)]
helpPoly3D vs = zl $ RenderPoly $ polyToTris vs
helpPoly3D :: [(Point3, Point4)] -> [Verx]
helpPoly3D vs = map f $ polyToTris vs
where
zl :: RenderType -> [(Int,RenderType)]
zl rt = [(0,rt)]
f (pos,col) = Verx pos col PolyV 0
polysToPic :: [Polyhedra] -> Picture
polysToPic = pictures . concatMap polyToPics