diff options
author | Joshua Rahm <joshua.rahm@colorado.edu> | 2014-04-23 14:25:59 -0600 |
---|---|---|
committer | Joshua Rahm <joshua.rahm@colorado.edu> | 2014-04-23 14:25:59 -0600 |
commit | e3a07ab4ccf65ddf052b483cf879f6a9bdd97720 (patch) | |
tree | f2806f605ec7d607813cb325c889307af379bab6 /Graphics/Glyph/BufferBuilder.hs | |
parent | 4d62a6d631fb9703d818654c5b9722e747cfe190 (diff) | |
parent | 4319bad3c312545e56c236a0515d1c1e9cdbf03d (diff) | |
download | terralloc-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.hs | 33 |
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 () |