diff options
author | Joshua Rahm <joshua.rahm@colorado.edu> | 2014-04-22 00:27:21 -0600 |
---|---|---|
committer | Joshua Rahm <joshua.rahm@colorado.edu> | 2014-04-22 00:27:21 -0600 |
commit | bc247b19550b58ce8e9f6ab82ac7607c8713de44 (patch) | |
tree | 4176eeea6fa453d2958303d2b33b49e6ca42d4d9 /Graphics/Glyph/BufferBuilder.hs | |
parent | 14b6f5cee8236f7c42065813c5dd6a659d4d5d65 (diff) | |
download | terralloc-bc247b19550b58ce8e9f6ab82ac7607c8713de44.tar.gz terralloc-bc247b19550b58ce8e9f6ab82ac7607c8713de44.tar.bz2 terralloc-bc247b19550b58ce8e9f6ab82ac7607c8713de44.zip |
added stuff for 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 () |