diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2023-11-22 03:56:58 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2023-11-22 03:56:58 +0100 |
commit | 9e749583791c9523efab90665ffd8f5c30e4f449 (patch) | |
tree | bcb7fd1774e0b1ca4f69ff19c9c2f9e3c63eac1a /src/quads.hpp | |
parent | 34c451c6b64ba1c11efa9a390c16e2097a25279a (diff) |
a wip
Diffstat (limited to 'src/quads.hpp')
-rw-r--r-- | src/quads.hpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/quads.hpp b/src/quads.hpp new file mode 100644 index 00000000..57492f35 --- /dev/null +++ b/src/quads.hpp @@ -0,0 +1,17 @@ +#pragma once +#include <array> +#include <Magnum/Math/Vector2.h> +#include <Magnum/Math/Vector3.h> + +namespace floormat::Quads { + +using quad = std::array<Vector3, 4>; +using texcoords = std::array<Vector2, 4>; + +quad floor_quad(Vector3 center, Vector2 size); +quad wall_quad_N(Vector3 center, Vector3 size); +quad wall_quad_W(Vector3 center, Vector3 size); +std::array<UnsignedShort, 6> quad_indexes(size_t N); +texcoords texcoords_at(Vector2ui pos, Vector2ui size, Vector2ui image_size); + +} // namespace floormat::Quads |