25 lines
622 B
Haskell
25 lines
622 B
Haskell
module ShapePicture
|
|
( module ShapePicture
|
|
, module ShapePicture.Data
|
|
)
|
|
where
|
|
import Shape
|
|
import ShapePicture.Data
|
|
import Picture
|
|
import Geometry
|
|
|
|
import Data.Bifunctor
|
|
|
|
emptyBlank :: SPic
|
|
emptyBlank = (emptySH,blank)
|
|
|
|
translateSPf :: Float -> Float -> SPic -> SPic
|
|
translateSPf x y = bimap (translateSH (V3 x y 0)) (translate x y)
|
|
|
|
-- TODO make this uniform: currently the shape translates and the picture is set to a constant
|
|
translateSPz :: Float -> SPic -> SPic
|
|
translateSPz z = bimap (translateSH (V3 0 0 z)) (setDepth z)
|
|
|
|
rotateSP :: Float -> SPic -> SPic
|
|
rotateSP a = bimap (rotateSH a) (rotate a)
|