summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoe Crayne <joe@jerkface.net>2019-06-14 21:24:08 -0400
committerJoe Crayne <joe@jerkface.net>2019-06-14 21:24:08 -0400
commit7c729b343a7fa340909caa9424dc68039ded2de7 (patch)
treec8385b0bc63ee87f049040ea9ff080c0c7c810fd
parentf3d1dd211b47d784b562a2251c5cd090ef06f8e9 (diff)
Defaulting for vertex coordinates.
-rw-r--r--src/Wavefront.hs6
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
59mkv :: [Double] -> Location 59mkv :: [Double] -> Location
60mkv cs = Location x y z w where (x:y:z:w:_) = map realToFrac cs 60mkv cs = Location x y z w where (x:y:z:w:_) = map realToFrac cs ++ repeat 1
61 61
62mkt :: [Double] -> TexCoord 62mkt :: [Double] -> TexCoord
63mkt cs = TexCoord x y z where (x:y:z:_) = map realToFrac cs 63mkt cs = TexCoord x y z where (x:y:z:_) = map realToFrac cs ++ repeat 0
64 64
65mkn :: [Double] -> Normal 65mkn :: [Double] -> Normal
66mkn cs = Normal x y z where (x:y:z:_) = map realToFrac cs 66mkn cs = Normal x y z where (x:y:z:_) = map realToFrac cs ++ repeat 0
67 67
68mkl :: RefTriple -> RefTriple -> Line 68mkl :: RefTriple -> RefTriple -> Line
69mkl (RefTriple a at _) (RefTriple b bt _) = Line (LineIndex a at) (LineIndex b bt) 69mkl (RefTriple a at _) (RefTriple b bt _) = Line (LineIndex a at) (LineIndex b bt)