Turn shapeObject's vertices into a stream
This commit is contained in:
+11
-8
@@ -7,15 +7,18 @@ module Shape.Data
|
||||
where
|
||||
import Geometry.Data
|
||||
|
||||
import qualified Data.Vector.Fusion.Stream.Monadic as VS
|
||||
import Data.Vector.Fusion.Util
|
||||
import Control.Lens
|
||||
type Shape = [ShapeObj]
|
||||
_shVertices :: Shape -> [ShapeV]
|
||||
{-# INLINE _shVertices #-}
|
||||
_shVertices = concatMap _shVs
|
||||
|
||||
shVList :: Shape -> [ShapeV]
|
||||
{-# INLINE shVList #-}
|
||||
shVList = _shVertices
|
||||
--_shVertices :: Shape -> [ShapeV]
|
||||
--{-# INLINE _shVertices #-}
|
||||
--_shVertices = concatMap _shVs
|
||||
|
||||
--shVList :: Shape -> [ShapeV]
|
||||
--{-# INLINE shVList #-}
|
||||
--shVList = _shVertices
|
||||
--shVList = DL.toList . _shVertices
|
||||
|
||||
{-# INLINE shVfromList #-}
|
||||
@@ -27,9 +30,9 @@ shEfromList = id
|
||||
|
||||
data ShapeObj = ShapeObj
|
||||
{ _shType :: ShapeType
|
||||
, _shVs :: [ShapeV]
|
||||
, _shVs :: VS.Stream IO ShapeV
|
||||
}
|
||||
deriving (Eq,Ord,Show)
|
||||
deriving ()
|
||||
|
||||
newtype ShapeType = TopPrism Int
|
||||
deriving (Eq,Ord,Show)
|
||||
|
||||
Reference in New Issue
Block a user