aboutsummaryrefslogtreecommitdiff
path: root/Graphics/Glyph/BufferBuilder.hs
diff options
context:
space:
mode:
authorJoshua Rahm <joshua.rahm@colorado.edu>2014-04-23 14:25:59 -0600
committerJoshua Rahm <joshua.rahm@colorado.edu>2014-04-23 14:25:59 -0600
commite3a07ab4ccf65ddf052b483cf879f6a9bdd97720 (patch)
treef2806f605ec7d607813cb325c889307af379bab6 /Graphics/Glyph/BufferBuilder.hs
parent4d62a6d631fb9703d818654c5b9722e747cfe190 (diff)
parent4319bad3c312545e56c236a0515d1c1e9cdbf03d (diff)
downloadterralloc-e3a07ab4ccf65ddf052b483cf879f6a9bdd97720.tar.gz
terralloc-e3a07ab4ccf65ddf052b483cf879f6a9bdd97720.tar.bz2
terralloc-e3a07ab4ccf65ddf052b483cf879f6a9bdd97720.zip
Merge branch 'sun'
Diffstat (limited to 'Graphics/Glyph/BufferBuilder.hs')
-rw-r--r--Graphics/Glyph/BufferBuilder.hs33
1 files changed, 33 insertions, 0 deletions
diff --git a/Graphics/Glyph/BufferBuilder.hs b/Graphics/Glyph/BufferBuilder.hs
index 809312e..43447a1 100644
--- a/Graphics/Glyph/BufferBuilder.hs
+++ b/Graphics/Glyph/BufferBuilder.hs
@@ -35,6 +35,39 @@ nelem (Plot _ _ _ l) = l
sizeofGLfloat :: Int
sizeofGLfloat = 4
+simpleCube :: Num a => [(a,a,a)]
+simpleCube = trianglesFromQuads [
+ (-1, 1,-1)
+ , ( 1, 1,-1)
+ , ( 1,-1,-1)
+ , (-1,-1,-1)
+
+ , (-1, 1, 1)
+ , ( 1, 1, 1)
+ , ( 1,-1, 1)
+ , (-1,-1, 1)
+
+ , (-1, 1, 1)
+ , ( 1, 1, 1)
+ , ( 1, 1,-1)
+ , (-1, 1,-1)
+
+ , (-1,-1, 1)
+ , ( 1,-1, 1)
+ , ( 1,-1,-1)
+ , (-1,-1,-1)
+
+ , (-1,-1, 1)
+ , (-1, 1, 1)
+ , (-1, 1,-1)
+ , (-1,-1,-1)
+
+ , ( 1,-1, 1)
+ , ( 1, 1, 1)
+ , ( 1, 1,-1)
+ , ( 1,-1,-1)
+ ]
+
class Monad a => IsModelBuilder b a where
plotVertex3 :: b -> b -> b -> a ()
plotNormal :: b -> b -> b -> a ()