tess
1.0.0
Performance-first tile and path simulation substrate
Toggle main menu visibility
Loading...
Searching...
No Matches
lattice.h
1
#pragma once
2
3
#include <concepts>
4
#include <cstdint>
5
6
namespace
tess::lattice {
7
9
enum class
Identity : std::uint32_t {
10
Orthogonal
= 0x4f525448,
11
HexAxial
= 0x48455841,
12
};
13
15
struct
Orthogonal
{
16
static
constexpr
Identity identity = Identity::Orthogonal;
17
static
constexpr
std::uint32_t version = 1;
18
19
template
<auto Size, auto Chunk>
20
static
constexpr
bool
valid_shape =
true
;
21
};
22
24
struct
HexAxial
{
25
static
constexpr
Identity identity = Identity::HexAxial;
26
static
constexpr
std::uint32_t version = 1;
27
28
template
<auto Size, auto Chunk>
29
static
constexpr
bool
valid_shape = Size.z == 1 && Chunk.z == 1;
30
};
31
33
template
<
typename
T>
34
concept
LatticeType
=
requires
{
35
{ T::identity } -> std::convertible_to<Identity>;
36
{ T::version } -> std::convertible_to<std::uint32_t>;
37
};
38
39
}
// namespace tess::lattice
tess::lattice::LatticeType
Definition
lattice.h:34
tess::lattice::HexAxial
Definition
lattice.h:24
tess::lattice::Orthogonal
Definition
lattice.h:15
include
tess
core
lattice.h
Generated by
1.17.0