Define shape datatype

This commit is contained in:
2021-09-14 01:17:07 +01:00
parent 29f048cfdd
commit 294e01479a
18 changed files with 226 additions and 111 deletions
+17
View File
@@ -0,0 +1,17 @@
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TemplateHaskell #-}
module Shape.Data
where
import Geometry.Data
import Control.Lens
data Shape = Shape
{ _shVertices :: [ShapeV]
, _shEdges :: [Point3]
}
-- edges are given by four consecutive points
data ShapeV = ShapeV
{ _svPos :: Point3
, _svCol :: Point4
}
makeLenses ''ShapeV
makeLenses ''Shape