Implement shading for more types of shapes (cylinders, boxes)
This commit is contained in:
+8
-5
@@ -19,11 +19,11 @@ shVfromList = id
|
||||
{-# INLINE shEfromList #-}
|
||||
shEfromList = id
|
||||
data ShapeType = TopPrism { _prismSize :: Int }
|
||||
-- | Surface { _surfaceSize :: Int}
|
||||
| TopBox { _topBoxSize :: Int }
|
||||
| TopCylinder { _topCylinderSize :: Int }
|
||||
deriving (Eq, Ord, Show, Read)
|
||||
--deriving stock Generic
|
||||
--deriving anyclass Flat
|
||||
|
||||
-- for TopCylinder, the first vertex in _sfVs should be the center of the top
|
||||
-- plane, the second should be the center of the bottom plane.
|
||||
|
||||
data Surface = Surface
|
||||
{ _sfType :: ShapeType
|
||||
@@ -38,7 +38,10 @@ makeLenses ''ShapeType
|
||||
type Shape = [Surface]
|
||||
|
||||
nShapeVerxComp :: Int
|
||||
nShapeVerxComp = 12
|
||||
nShapeVerxComp = sum shapeVerxSizes
|
||||
|
||||
shapeVerxSizes :: [Int]
|
||||
shapeVerxSizes = [4,4,4]
|
||||
|
||||
deriveJSON defaultOptions ''ShapeType
|
||||
deriveJSON defaultOptions ''Surface
|
||||
|
||||
Reference in New Issue
Block a user