Working (but slow) shadow shapes

This commit is contained in:
2021-09-17 23:12:51 +01:00
parent 294e01479a
commit 6ac53c052c
16 changed files with 167 additions and 60 deletions
+6
View File
@@ -4,10 +4,16 @@ module Shape.Data
where
import Geometry.Data
import Control.Lens
--import Data.Monoid
data Shape = Shape
{ _shVertices :: [ShapeV]
, _shEdges :: [Point3]
}
instance Semigroup Shape where
(<>) (Shape sv1 se1) (Shape sv2 se2) = Shape (sv1 ++ sv2) (se1 ++ se2)
instance Monoid Shape where
mempty = Shape [] []
-- edges are given by four consecutive points
data ShapeV = ShapeV
{ _svPos :: Point3