diff options
Diffstat (limited to 'src/cube.cpp')
-rw-r--r-- | src/cube.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/cube.cpp b/src/cube.cpp index c181794..60422a2 100644 --- a/src/cube.cpp +++ b/src/cube.cpp @@ -1,8 +1,12 @@ #include "cube.hpp" Cube::Cube() { - for (std::uint8_t i = 0; i < 8; ++i) - vertices.add({(i >> 2) & 1, (i >> 1) & 1, i & 1}); + for (std::uint8_t i = 0; i < 8; ++i) { + VECTOR vertex = {int2fx((((i >> 2) & 1) << 1) - 1), + int2fx((((i >> 1) & 1) << 1) - 1), + int2fx(((i & 1) << 1) - 1)}; + vertices.add(vertex); + } triangles.add({{0, 4, 5}, 1}); triangles.add({{0, 1, 5}, 1}); |