diff options
author | Joe Crayne <joe@jerkface.net> | 2019-06-14 21:24:08 -0400 |
---|---|---|
committer | Joe Crayne <joe@jerkface.net> | 2019-06-14 21:24:08 -0400 |
commit | 7c729b343a7fa340909caa9424dc68039ded2de7 (patch) | |
tree | c8385b0bc63ee87f049040ea9ff080c0c7c810fd | |
parent | f3d1dd211b47d784b562a2251c5cd090ef06f8e9 (diff) |
Defaulting for vertex coordinates.
-rw-r--r-- | src/Wavefront.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Wavefront.hs b/src/Wavefront.hs index 0da9f41..51a0e6b 100644 --- a/src/Wavefront.hs +++ b/src/Wavefront.hs | |||
@@ -57,13 +57,13 @@ objBookKeeping builder = (lift Rank2.<$> builder) | |||
57 | } | 57 | } |
58 | 58 | ||
59 | mkv :: [Double] -> Location | 59 | mkv :: [Double] -> Location |
60 | mkv cs = Location x y z w where (x:y:z:w:_) = map realToFrac cs | 60 | mkv cs = Location x y z w where (x:y:z:w:_) = map realToFrac cs ++ repeat 1 |
61 | 61 | ||
62 | mkt :: [Double] -> TexCoord | 62 | mkt :: [Double] -> TexCoord |
63 | mkt cs = TexCoord x y z where (x:y:z:_) = map realToFrac cs | 63 | mkt cs = TexCoord x y z where (x:y:z:_) = map realToFrac cs ++ repeat 0 |
64 | 64 | ||
65 | mkn :: [Double] -> Normal | 65 | mkn :: [Double] -> Normal |
66 | mkn cs = Normal x y z where (x:y:z:_) = map realToFrac cs | 66 | mkn cs = Normal x y z where (x:y:z:_) = map realToFrac cs ++ repeat 0 |
67 | 67 | ||
68 | mkl :: RefTriple -> RefTriple -> Line | 68 | mkl :: RefTriple -> RefTriple -> Line |
69 | mkl (RefTriple a at _) (RefTriple b bt _) = Line (LineIndex a at) (LineIndex b bt) | 69 | mkl (RefTriple a at _) (RefTriple b bt _) = Line (LineIndex a at) (LineIndex b bt) |