Working dynamic shadows using shape vertices buffer
This commit is contained in:
+6
-16
@@ -6,25 +6,20 @@
|
||||
module Shape.Data
|
||||
where
|
||||
import Geometry.Data
|
||||
|
||||
import Control.Lens
|
||||
--import qualified Data.DList as DL
|
||||
|
||||
type Shape = ([ShapeObj], [Point3])
|
||||
type Shape = [ShapeObj]
|
||||
|
||||
_shVertices :: Shape -> [ShapeV]
|
||||
{-# INLINE _shVertices #-}
|
||||
_shVertices = concatMap _shVs . fst
|
||||
_shEdges :: Shape -> [Point3]
|
||||
{-# INLINE _shEdges #-}
|
||||
_shEdges = snd
|
||||
_shVertices = concatMap _shVs
|
||||
|
||||
shVList :: Shape -> [ShapeV]
|
||||
{-# INLINE shVList #-}
|
||||
shVList = _shVertices
|
||||
--shVList = DL.toList . _shVertices
|
||||
shEList :: Shape -> [Point3]
|
||||
{-# INLINE shEList #-}
|
||||
shEList = _shEdges
|
||||
--shEList = DL.toList . _shEdges
|
||||
|
||||
{-# INLINE shVfromList #-}
|
||||
shVfromList = id
|
||||
@@ -38,9 +33,7 @@ data ShapeObj = ShapeObj
|
||||
, _shVs :: [ShapeV]
|
||||
}
|
||||
|
||||
data ShapeType
|
||||
= TopPrism Int
|
||||
-- | ListV
|
||||
newtype ShapeType = TopPrism Int
|
||||
|
||||
-- edges are given by four consecutive points
|
||||
data ShapeV = ShapeV
|
||||
@@ -51,7 +44,4 @@ pairToSV :: (Point3,Point4) -> ShapeV
|
||||
{-# INLINE pairToSV #-}
|
||||
pairToSV = uncurry ShapeV
|
||||
|
||||
--_svPos :: ShapeV -> Point3
|
||||
--_svPos = fst
|
||||
--_svCol :: ShapeV -> Point4
|
||||
--_svCol = snd
|
||||
makeLenses ''ShapeV
|
||||
|
||||
Reference in New Issue
Block a user