Allow for items to cast shadows

This commit is contained in:
2021-09-18 11:00:52 +01:00
parent 6ac53c052c
commit 2d8f1089a1
18 changed files with 236 additions and 172 deletions
+12 -3
View File
@@ -9,9 +9,18 @@ import Picture
import Geometry
emptyBlank :: SPic
emptyBlank = SPic empty blank
emptyBlank = SPic emptySH blank
translateSP :: Float -> Float -> SPic -> SPic
translateSP x y (SPic sh pic) = SPic
translateSPf :: Float -> Float -> SPic -> SPic
translateSPf x y (SPic sh pic) = SPic
(translateSH (V3 x y 0) sh)
(translate x y pic)
-- TODO make this uniform: currently the shape translates and the picture is set to a constant
translateSPz :: Float -> SPic -> SPic
translateSPz z (SPic sh pic) = SPic
(translateSH (V3 0 0 z) sh)
(setDepth z pic)
rotateSP :: Float -> SPic -> SPic
rotateSP a (SPic sh pic) = SPic (rotateSH a sh) (rotate a pic)