an imagecabal build && ./raytrace && eog out.png

This commit is contained in:
Stefan Dresselhaus
2014-10-23 18:51:27 +02:00
parent 551685e131
commit 9205c91cc7
3 changed files with 55 additions and 7 deletions

View File

@ -84,3 +84,8 @@ data Scene = Scene
, sceneObjects :: [Collidable]
}
deriving (Show, Eq)
getMaterial :: Collidable -> Material
getMaterial (S (Sphere _ _ m)) = m
getMaterial (P (Plane _ _ m)) = m
getMaterial (M (Mesh _ _ m)) = m