summaryrefslogtreecommitdiff
path: root/src/Graphics/WaveFront/Types.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Graphics/WaveFront/Types.hs')
-rw-r--r--src/Graphics/WaveFront/Types.hs13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/Graphics/WaveFront/Types.hs b/src/Graphics/WaveFront/Types.hs
index ccd1425..5b093de 100644
--- a/src/Graphics/WaveFront/Types.hs
+++ b/src/Graphics/WaveFront/Types.hs
@@ -43,7 +43,7 @@ module Graphics.WaveFront.Types where
43import Data.Functor.Classes (Show1) --Eq1, Show1, showsPrec1, eq1) 43import Data.Functor.Classes (Show1) --Eq1, Show1, showsPrec1, eq1)
44import Data.Map as M (Map) 44import Data.Map as M (Map)
45import Data.Set as S (Set) 45import Data.Set as S (Set)
46import Linear (V2(..), V3(..)) 46import Linear (V2(..), V3(..), V4(..))
47 47
48 48
49 49
@@ -65,9 +65,9 @@ import Linear (V2(..), V3(..))
65-- 65--
66-- - Cover the entire spec (http://www.martinreddy.net/gfx/3d/OBJ.spec) 66-- - Cover the entire spec (http://www.martinreddy.net/gfx/3d/OBJ.spec)
67-- (and handle unimplemented attributes gracefully) 67-- (and handle unimplemented attributes gracefully)
68data OBJToken f s i m = OBJVertex (V3 f) | 68data OBJToken f s i m = OBJVertex (V4 f) |
69 OBJNormal (V3 f) | 69 OBJNormal (V3 f) |
70 OBJTexCoord (V2 f) | 70 OBJTexCoord (V3 f) |
71 OBJFace (m (VertexIndices i)) | -- TODO: Associate material with each face, handle absent indices 71 OBJFace (m (VertexIndices i)) | -- TODO: Associate material with each face, handle absent indices
72 72
73 Line i i | -- Line (I'm assuming the arguments are indices to the endpoint vertices) 73 Line i i | -- Line (I'm assuming the arguments are indices to the endpoint vertices)
@@ -202,9 +202,9 @@ data Material f s = Material {
202-- fTextures :: Set s, 202-- fTextures :: Set s,
203-- data Model f s i m = Model { 203-- data Model f s i m = Model {
204data Model f s i m = Model { 204data Model f s i m = Model {
205 fVertices :: m (V3 f), 205 fVertices :: m (V4 f),
206 fNormals :: m (V3 f), 206 fNormals :: m (V3 f),
207 fTexcoords :: m (V2 f), 207 fTexcoords :: m (V3 f),
208 fFaces :: m (Face f s i m), 208 fFaces :: m (Face f s i m),
209 fMaterials :: MTLTable f s, -- TODO: Type synonym (?) 209 fMaterials :: MTLTable f s, -- TODO: Type synonym (?)
210 fGroups :: Map (Set s) (i, i), -- TODO: Type synonym 210 fGroups :: Map (Set s) (i, i), -- TODO: Type synonym
@@ -229,6 +229,7 @@ deriving instance (Show1 m,
229 Show (m f), 229 Show (m f),
230 Show (m (V2 f)), 230 Show (m (V2 f)),
231 Show (m (V3 f)), 231 Show (m (V3 f)),
232 Show (m (V4 f)),
232 Show (m (Face f s i m)), 233 Show (m (Face f s i m)),
233 Show (m s), 234 Show (m s),
234 Show f, 235 Show f,
@@ -251,4 +252,4 @@ deriving instance (Show1 m,
251 Show (m s), 252 Show (m s),
252 Show f, 253 Show f,
253 Show s, 254 Show s,
254 Show i) => Show (OBJToken f s i m) -- where showsPrec = _ \ No newline at end of file 255 Show i) => Show (OBJToken f s i m) -- where showsPrec = _