summaryrefslogtreecommitdiffhomepage
path: root/src/quads.hpp
blob: 57492f35d80e5d64843059af5f5ec0b68a7d9cdc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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