aboutsummaryrefslogtreecommitdiff
path: root/Graphics/Glyph/BufferBuilder.hs
diff options
context:
space:
mode:
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 ()