summaryrefslogtreecommitdiff
path: root/src/static
diff options
context:
space:
mode:
Diffstat (limited to 'src/static')
-rw-r--r--src/static/cube.cpp49
-rw-r--r--src/static/cube.hpp16
2 files changed, 65 insertions, 0 deletions
diff --git a/src/static/cube.cpp b/src/static/cube.cpp
new file mode 100644
index 0000000..92c6274
--- /dev/null
+++ b/src/static/cube.cpp
@@ -0,0 +1,49 @@
+
+#include "./cube.hpp"
+
+IntrinsicShapeCube pkeIntrinsicsCube {
+ .vert = {
+ {-1, -1, -1},
+ {-1, -1, 1},
+ {-1, 1, 1},
+ {-1, 1, -1},
+ {1, 1, 1},
+ {1, 1, -1},
+ {1, -1, -1},
+ {1, -1, 1},
+ },
+ .norm = {
+ {-1, -1, -1},
+ {-1, -1, 1},
+ {-1, 1, 1},
+ {-1, 1, -1},
+ {1, 1, 1},
+ {1, 1, -1},
+ {1, -1, -1},
+ {1, -1, 1},
+ },
+ .uv = {
+ {0, 0},
+ {0, 0},
+ {0, 0},
+ {0, 0},
+ {0, 0},
+ {0, 0},
+ {0, 0},
+ {0, 0},
+ },
+ .index = {
+ 0, 1, 2,
+ 5, 0, 3,
+ 7, 0, 6,
+ 5, 6, 0,
+ 0, 2, 3,
+ 7, 1, 0,
+ 2, 1, 7,
+ 4, 6, 5,
+ 6, 4, 7,
+ 4, 5, 3,
+ 4, 3, 2,
+ 4, 2, 7,
+ },
+};
diff --git a/src/static/cube.hpp b/src/static/cube.hpp
new file mode 100644
index 0000000..77ff439
--- /dev/null
+++ b/src/static/cube.hpp
@@ -0,0 +1,16 @@
+#ifndef PKE_STATIC_CUBE_HPP
+#define PKE_STATIC_CUBE_HPP
+
+#include <glm/ext/vector_float3.hpp>
+#include <glm/ext/vector_float2.hpp>
+
+struct IntrinsicShapeCube {
+ glm::vec3 vert[8];
+ glm::vec3 norm[8];
+ glm::vec2 uv[8];
+ uint16_t index[36];
+};
+
+extern IntrinsicShapeCube pkeIntrinsicsCube;
+
+#endif /* PKE_STATIC_CUBE_HPP */