Initial pass at shadows from level geometry

This commit is contained in:
jgk
2021-06-29 15:27:26 +02:00
parent 089dcc3f5d
commit 3d16c33d33
20 changed files with 181 additions and 74 deletions
+8
View File
@@ -1,6 +1,7 @@
{-# LANGUAGE BangPatterns #-}
module Geometry.Vector3D
where
import Geometry.Vector
import Geometry.Data
infixl 6 +.+.+, -.-.-
@@ -40,3 +41,10 @@ crossProd (x,y,z) (a,b,c) =
, z * a - x * c
, x * b - y * a
)
rotate3 :: Float -> Point3 -> Point3
{-# INLINE rotate3 #-}
rotate3 a (x,y,z) = (x',y',z)
where
(x',y') = rotateV a (x,y)