Working shadows from foreground, not optimised
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
module Polyhedra
|
||||
where
|
||||
import Geometry
|
||||
import Geometry.Data
|
||||
import Geometry.Vector3D
|
||||
import Polyhedra.Data
|
||||
@@ -90,5 +91,9 @@ polysToPic = pictures . concatMap polyToPics
|
||||
polyToEdges :: Polyhedra -> [(Point3,Point3,Point3,Point3)]
|
||||
polyToEdges = constructEdges . map (map fst) . _pyFaces
|
||||
|
||||
-- rendering for silhouette
|
||||
polyToRender :: Polyhedra -> [RenderType]
|
||||
polyToRender = map Render3 . map flat4 . polyToEdges
|
||||
-- rendering for shape
|
||||
polyToGeoRender :: Polyhedra -> [RenderType]
|
||||
polyToGeoRender = map (Render3 . polyToTris . map fst) . _pyFaces
|
||||
|
||||
Reference in New Issue
Block a user