diff options
Diffstat (limited to 'src/Graphics/WaveFront/Parse/OBJ.hs')
-rw-r--r-- | src/Graphics/WaveFront/Parse/OBJ.hs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/Graphics/WaveFront/Parse/OBJ.hs b/src/Graphics/WaveFront/Parse/OBJ.hs index 2c3919e..df4b52e 100644 --- a/src/Graphics/WaveFront/Parse/OBJ.hs +++ b/src/Graphics/WaveFront/Parse/OBJ.hs | |||
@@ -83,6 +83,7 @@ token = (Atto.string "f" *> face) <|> | |||
83 | -- TODO: How to deal with common prefix (v, vn, vt) (backtrack?) (doesn't seem to be a problem) | 83 | -- TODO: How to deal with common prefix (v, vn, vt) (backtrack?) (doesn't seem to be a problem) |
84 | (Atto.string "vn" *> normal) <|> | 84 | (Atto.string "vn" *> normal) <|> |
85 | (Atto.string "vt" *> texcoord) <|> | 85 | (Atto.string "vt" *> texcoord) <|> |
86 | (Atto.string "vp" *> paramcoord) <|> | ||
86 | (Atto.string "v" *> vertex) <|> | 87 | (Atto.string "v" *> vertex) <|> |
87 | (Atto.string "o" *> object) <|> | 88 | (Atto.string "o" *> object) <|> |
88 | (Atto.string "g" *> group) <|> | 89 | (Atto.string "g" *> group) <|> |
@@ -137,10 +138,13 @@ normal :: (Fractional f) => Atto.Parser (OBJToken f Text i m) | |||
137 | normal = OBJNormal <$> point3D | 138 | normal = OBJNormal <$> point3D |
138 | 139 | ||
139 | 140 | ||
140 | -- | Two coordinates, separated by whitespace | 141 | -- | One to three coordinates, separated by whitespace |
141 | texcoord :: (Fractional f) => Atto.Parser (OBJToken f Text i m) | 142 | texcoord :: (Fractional f) => Atto.Parser (OBJToken f Text i m) |
142 | texcoord = OBJTexCoord <$> pointTo3 1 0.0 | 143 | texcoord = OBJTexCoord <$> pointTo3 1 0.0 |
143 | 144 | ||
145 | -- | One to three coordinates, separated by whitespace | ||
146 | paramcoord :: (Fractional f) => Atto.Parser (OBJToken f Text i m) | ||
147 | paramcoord = OBJParamCoord <$> pointTo3 1 0.0 | ||
144 | 148 | ||
145 | -- | Three coordinates, separated by whitespace | 149 | -- | Three coordinates, separated by whitespace |
146 | vertex :: (Fractional f) => Atto.Parser (OBJToken f s i m) | 150 | vertex :: (Fractional f) => Atto.Parser (OBJToken f s i m) |