Reset Shapes to be list (not stream) of ShapeObj
This commit is contained in:
+4
-2
@@ -23,6 +23,8 @@ import qualified Streaming.Prelude as S
|
||||
|
||||
type SPic = (Shape, Picture)
|
||||
|
||||
shMap = map
|
||||
|
||||
-- should all this be inlined/inlinable?
|
||||
noPic :: Shape -> SPic
|
||||
{-# INLINE noPic #-}
|
||||
@@ -58,12 +60,12 @@ rotateSP a = bimap (rotateSH a) (rotate a)
|
||||
|
||||
mirrorSPxz :: SPic -> SPic
|
||||
{-# INLINE mirrorSPxz #-}
|
||||
mirrorSPxz = bimap (S.map (over shVs reverse) . overPosSH flipy) mirrorxz
|
||||
mirrorSPxz = bimap (shMap (over shVs reverse) . overPosSH flipy) mirrorxz
|
||||
where
|
||||
flipy (V3 x y z) = V3 x (negate y) z
|
||||
|
||||
mirrorSPyz :: SPic -> SPic
|
||||
{-# INLINE mirrorSPyz #-}
|
||||
mirrorSPyz = bimap (S.map (over shVs reverse) . overPosSH flipx) mirroryz
|
||||
mirrorSPyz = bimap (shMap (over shVs reverse) . overPosSH flipx) mirroryz
|
||||
where
|
||||
flipx (V3 x y z) = V3 (negate x) y z
|
||||
|
||||
Reference in New Issue
Block a user