Allow tweaking z buffer when rendering polygon, improve explosion render

This commit is contained in:
2021-07-03 23:56:01 +02:00
parent 532f491327
commit 9df19a9e85
33 changed files with 339 additions and 82 deletions
+12
View File
@@ -5,6 +5,8 @@ module Polyhedra.Data
import Geometry.Data
import Control.Lens
import qualified Data.Map as M
--import qualified Data.IntSet as IS
-- | Polyhedra are represented as a list of faces.
-- Each face is a list of points (and colours) that are assumed to lie on a plane, and be
-- ordered to form an anticlockwise convex polygon within that plane.
@@ -12,4 +14,14 @@ data Polyhedra = Polyhedron
{ _pyFaces :: [[(Point3,Point4)]]
}
-- | Describe a polygon as a map from vertex indices to a positiong and list of faces.
-- The list of faces is assumed to be ordered in clockwise direction around the vertex.
-- The vertices of the faces are assumed to start with a point adjacent to the
-- key vertex and to be listed anticlockwise around the center of the face.
-- The key vertex is not included in the list.
data VF a = VF
{ _vertices :: M.Map a (Point3, [[a]])
}
makeLenses ''Polyhedra
makeLenses ''VF