From a5be1222b3522dd9e58a10dfb4d3210970faab02 Mon Sep 17 00:00:00 2001 From: Joe Crayne Date: Mon, 22 Apr 2019 03:45:01 -0400 Subject: Use 3x3 rotation matrices instead of 4x4. --- mainObj.hs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'mainObj.hs') diff --git a/mainObj.hs b/mainObj.hs index caa4fa4..9792ff6 100644 --- a/mainObj.hs +++ b/mainObj.hs @@ -13,7 +13,6 @@ import Data.Text (Text) import Data.Map.Strict (Map) import qualified Data.Map.Strict as Map import qualified Data.Vector as V -import Data.Vector.Generic as VG (init,snoc) import GI.Gdk.Objects import GI.GLib.Constants import GI.Gtk as Gtk hiding (main) @@ -82,8 +81,8 @@ setUniforms gl storage st = do roZ = rotMatrixZ (-tf) roX = rotMatrixX (-tf) ro = roZ <> roX - pos = VG.init (ro #> fromList [0,0,10,0]) - up = VG.init (ro #> fromList [0,1,0,0]) + pos = ro #> fromList [0,0,10] + up = ro #> fromList [0,1,0] cam = lookat pos 0 up LC.updateUniforms storage $ do "cam" @= return (cam :: Matrix Float) -- cgit v1.2.3