Redo shape vertices as a list, should allow for mirroring
This commit is contained in:
+8
-9
@@ -18,6 +18,8 @@ import Picture
|
||||
import Geometry
|
||||
|
||||
import Data.Bifunctor
|
||||
import Control.Lens
|
||||
import qualified Streaming.Prelude as S
|
||||
|
||||
type SPic = (Shape, Picture)
|
||||
|
||||
@@ -49,14 +51,11 @@ rotateSP :: Float -> SPic -> SPic
|
||||
rotateSP a = bimap (rotateSH a) (rotate a)
|
||||
|
||||
mirrorSPxz :: SPic -> SPic
|
||||
mirrorSPxz = bimap id mirrorxz
|
||||
--mirrorSPxz = bimap (reverse . overPosSH flipy) mirrorxz
|
||||
-- where
|
||||
-- flipy (V3 x y z) = V3 x (negate y) z
|
||||
mirrorSPxz = bimap (S.map (over shVs reverse) . overPosSH flipy) mirrorxz
|
||||
where
|
||||
flipy (V3 x y z) = V3 x (negate y) z
|
||||
|
||||
mirrorSPyz :: SPic -> SPic
|
||||
mirrorSPyz = bimap id mirroryz
|
||||
-- this can be done by creating a reverse topprism ShapeObj
|
||||
--mirrorSPyz = bimap (reverse . overPosSH flipx) mirroryz
|
||||
-- where
|
||||
-- flipx (V3 x y z) = V3 (negate x) y z
|
||||
mirrorSPyz = bimap (S.map (over shVs reverse) . overPosSH flipx) mirroryz
|
||||
where
|
||||
flipx (V3 x y z) = V3 (negate x) y z
|
||||
|
||||
Reference in New Issue
Block a user