diff options
author | Joe Crayne <joe@jerkface.net> | 2019-06-11 04:10:57 -0400 |
---|---|---|
committer | Joe Crayne <joe@jerkface.net> | 2019-06-11 04:10:57 -0400 |
commit | f72f1d38e940647381bdfc380b9b7f25ee9a117d (patch) | |
tree | d21e6d5244ac670f953755f6f169749eaebd4fab /src | |
parent | 7303e1d9c65c6d1c91e89bfdf7b4bf3313ea7b06 (diff) |
Add parameter coords to WavefrontOBJ.
Diffstat (limited to 'src')
-rw-r--r-- | src/Codec/Wavefront/Object.hs | 3 | ||||
-rw-r--r-- | src/Codec/Wavefront/TexCoord.hs | 6 |
2 files changed, 6 insertions, 3 deletions
diff --git a/src/Codec/Wavefront/Object.hs b/src/Codec/Wavefront/Object.hs index 15557fe..bdd756f 100644 --- a/src/Codec/Wavefront/Object.hs +++ b/src/Codec/Wavefront/Object.hs | |||
@@ -30,6 +30,8 @@ data WavefrontOBJ = WavefrontOBJ { | |||
30 | , objTexCoords :: Vector TexCoord | 30 | , objTexCoords :: Vector TexCoord |
31 | -- |Normals. | 31 | -- |Normals. |
32 | , objNormals :: Vector Normal | 32 | , objNormals :: Vector Normal |
33 | -- |Parameter-space coordinates. | ||
34 | , objParamCoords :: Vector ParamCoord | ||
33 | -- |Points. | 35 | -- |Points. |
34 | , objPoints :: Vector (Element Point) | 36 | , objPoints :: Vector (Element Point) |
35 | -- |Lines. | 37 | -- |Lines. |
@@ -45,6 +47,7 @@ ctxtToWavefrontOBJ ctxt = WavefrontOBJ { | |||
45 | objLocations = fromDList (ctxtLocations ctxt) | 47 | objLocations = fromDList (ctxtLocations ctxt) |
46 | , objTexCoords = fromDList (ctxtTexCoords ctxt) | 48 | , objTexCoords = fromDList (ctxtTexCoords ctxt) |
47 | , objNormals = fromDList (ctxtNormals ctxt) | 49 | , objNormals = fromDList (ctxtNormals ctxt) |
50 | , objParamCoords = fromDList (ctxtParamCoords ctxt) | ||
48 | , objPoints = fromDList (ctxtPoints ctxt) | 51 | , objPoints = fromDList (ctxtPoints ctxt) |
49 | , objLines = fromDList (ctxtLines ctxt) | 52 | , objLines = fromDList (ctxtLines ctxt) |
50 | , objFaces = fromDList (ctxtFaces ctxt) | 53 | , objFaces = fromDList (ctxtFaces ctxt) |
diff --git a/src/Codec/Wavefront/TexCoord.hs b/src/Codec/Wavefront/TexCoord.hs index 0eb09f4..000ed06 100644 --- a/src/Codec/Wavefront/TexCoord.hs +++ b/src/Codec/Wavefront/TexCoord.hs | |||
@@ -35,8 +35,8 @@ data TexCoord = TexCoord { | |||
35 | -- | 35 | -- |
36 | -- That type is strict and unboxed. | 36 | -- That type is strict and unboxed. |
37 | data ParamCoord = ParamCoord { | 37 | data ParamCoord = ParamCoord { |
38 | paramcoordR :: {-# UNPACK #-} !Float | 38 | paramcoordU :: {-# UNPACK #-} !Float |
39 | , paramcoordS :: {-# UNPACK #-} !Float | 39 | , paramcoordV :: {-# UNPACK #-} !Float |
40 | , paramcoordT :: {-# UNPACK #-} !Float | 40 | , paramcoordW :: {-# UNPACK #-} !Float |
41 | } deriving (Eq,Show) | 41 | } deriving (Eq,Show) |
42 | 42 | ||