summaryrefslogtreecommitdiffhomepage
path: root/src/quads.hpp
blob: a15ca97221f69b9f6eb3c40804cca35f3831946d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#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>;
using indexes = std::array<UnsignedShort, 6>;

quad floor_quad(Vector3 center, Vector2 size);
indexes quad_indexes(size_t N);
texcoords texcoords_at(Vector2ui pos, Vector2ui size, Vector2ui image_size);

} // namespace floormat::Quads