Reify block drawing
This commit is contained in:
+12
-2
@@ -1,9 +1,10 @@
|
||||
{-# LANGUAGE TemplateHaskell #-}
|
||||
{-# LANGUAGE StrictData #-}
|
||||
module Dodge.Data.Block where
|
||||
import Shape.Data
|
||||
import Color
|
||||
import Dodge.Data.Material
|
||||
import Dodge.Data.PathGraph
|
||||
import ShapePicture
|
||||
import Geometry
|
||||
import Control.Lens
|
||||
import qualified Data.IntSet as IS
|
||||
@@ -17,7 +18,16 @@ data Block = Block
|
||||
, _blDir :: Float
|
||||
, _blHeight :: Float
|
||||
, _blMaterial :: Material
|
||||
, _blDraw :: Block -> SPic
|
||||
, _blDraw :: BlockDraw --Block -> SPic
|
||||
, _blObstructs :: [(Int,Int,PathEdge)]
|
||||
}
|
||||
deriving (Eq,Ord,Show,Read)
|
||||
data BlockDraw = BlockDrawMempty
|
||||
| BlockDrawBlSh BlSh
|
||||
| BlockDraws [BlockDraw]
|
||||
| BlockDrawColHeightPoss Color Float [Point2]
|
||||
deriving (Eq,Ord,Show,Read)
|
||||
data BlSh = BlShMempty
|
||||
| BlShConst Shape
|
||||
deriving (Eq,Ord,Show,Read)
|
||||
makeLenses ''Block
|
||||
|
||||
Reference in New Issue
Block a user