WIP, does not compile.
This commit is contained in:
parent
87946cb501
commit
a3f0043591
@ -216,7 +216,7 @@ parseIQM a =
|
||||
vbo <- sequence $ map toVBOfromVAO va
|
||||
return $ raw
|
||||
{ vertexArrays = va'
|
||||
, vertexArrayObjects = vbo
|
||||
, vertexBufferObjects = vbo
|
||||
}
|
||||
|
||||
-- | Creates a BufferObject on the Graphicscard for each BufferObject
|
||||
|
@ -109,7 +109,8 @@ data IQM = IQM
|
||||
, texts :: [ByteString]
|
||||
, meshes :: [IQMMesh]
|
||||
, vertexArrays :: [IQMVertexArray]
|
||||
, vertexArrayObjects :: [BufferObject]
|
||||
, vertexBufferObjects :: [BufferObject]
|
||||
, vertexArrayObject :: VertexArrayObject
|
||||
} deriving (Show, Eq)
|
||||
|
||||
-- | Different Vertex-Array-Types in IQM
|
||||
|
@ -34,7 +34,7 @@ instance GLCamera Camera where
|
||||
getCam (Flat (x',z')) dist' xa' ya' =
|
||||
lookAt (cpos ^+^ at') at' up
|
||||
where
|
||||
at' = V3 x 0 z
|
||||
at' = V3 x (y+1) z
|
||||
cpos = crot !* (V3 0 0 (-dist))
|
||||
crot = (
|
||||
(fromQuaternion $ axisAngle upmap (xa::CFloat))
|
||||
@ -52,7 +52,7 @@ instance GLCamera Camera where
|
||||
getCam (Sphere (inc',az') r') dist' xa' ya' = --inclination (pitch), azimuth (yaw)
|
||||
lookAt (cpos ^+^ at') at' up
|
||||
where
|
||||
at' = sphereToCart r inc az
|
||||
at' = sphereToCart (r+1) inc az
|
||||
cpos = crot !* (V3 0 0 (-dist))
|
||||
crot = (
|
||||
(fromQuaternion $ axisAngle upmap (xa::CFloat))
|
||||
@ -76,4 +76,4 @@ sphereToCart :: (Floating a) => a -> a -> a -> V3 a
|
||||
sphereToCart r inc az = V3
|
||||
(r * (sin inc) * (cos az))
|
||||
(r * (sin inc) * (sin az))
|
||||
(r * (cos inc))
|
||||
(r * (cos inc))
|
||||
|
Loading…
Reference in New Issue
Block a user