Working (but slow) shadow shapes
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user