Skip to content

Commit

Permalink
update to linear-1.18
Browse files Browse the repository at this point in the history
  • Loading branch information
bergey committed Oct 28, 2015
1 parent d3b231d commit 446377e
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion wikibook/tutorial-04-matrices/Linear.hs
Expand Up @@ -76,7 +76,7 @@ data Resources = Resources { triProgram :: U.ShaderProgram
transformM :: Real n => n -> L.M44 GL.GLfloat
transformM t' = translation L.!*! rotation where
t = realToFrac t'
translation = L.mkTransformationMat L.eye3 $ L.V3 dx 0 0
translation = L.mkTransformationMat L.identity $ L.V3 dx 0 0
dx = sin t * 2 * pi / 5
rotation = L.m33_to_m44 . L.fromQuaternion $ L.axisAngle (L.V3 0 0 1) angle
angle = t * pi / 4 -- Linear is in radians
Expand Down
2 changes: 1 addition & 1 deletion wikibook/tutorial-05-3D/GLUtil.hs
Expand Up @@ -83,7 +83,7 @@ transformM :: Int -> Int -> Double -> L.M44 GL.GLfloat
transformM width height t = projection L.!*! view L.!*! model L.!*! anim where
angle = realToFrac t * pi/4
anim = L.mkTransformation (L.axisAngle (L.V3 0 1 0) angle) L.zero
model = L.mkTransformationMat L.eye3 $ L.V3 0 0 (-4)
model = L.mkTransformationMat L.identity $ L.V3 0 0 (-4)
view = U.camMatrix cam
cam = U.tilt (-30) . U.dolly (L.V3 0 2 0) $ U.fpsCamera
projection = U.projectionMatrix (pi/4) aspect 0.1 10
Expand Down
2 changes: 1 addition & 1 deletion wikibook/tutorial-05-3D/TH.hs
Expand Up @@ -82,7 +82,7 @@ transformM width height t =
where
angle = realToFrac t * pi/4
anim = L.mkTransformation (L.axisAngle (L.V3 0 1 0) angle) L.zero
model = L.mkTransformationMat L.eye3 $ L.V3 0 0 (-4)
model = L.mkTransformationMat L.identity $ L.V3 0 0 (-4)
view = U.camMatrix cam
cam = U.tilt (-30) . U.dolly (L.V3 0 2 0) $ U.fpsCamera
projection = U.projectionMatrix (pi/4) aspect 0.1 10
Expand Down
2 changes: 1 addition & 1 deletion wikibook/tutorial-05-3D/Vinyl.hs
Expand Up @@ -80,7 +80,7 @@ transformM width height t =
where
angle = realToFrac t * pi/4
anim = L.mkTransformation (L.axisAngle (L.V3 0 1 0) angle) L.zero
model = L.mkTransformationMat L.eye3 $ L.V3 0 0 (-4)
model = L.mkTransformationMat L.identity $ L.V3 0 0 (-4)
view = U.camMatrix cam
cam = U.tilt (-30) . U.dolly (L.V3 0 2 0) $ U.fpsCamera
projection = U.projectionMatrix (pi/4) aspect 0.1 10
Expand Down

0 comments on commit 446377e

Please sign in to comment.