Graphite
Loading...
Searching...
No Matches
block.hpp
Go to the documentation of this file.
1
2
#pragma once
3
#include <
graphite/utils.hpp
>
4
5
namespace
graphite {
6
class
BlockCoordinates
{
7
public
:
8
size_t
row;
9
size_t
col;
10
11
bool
operator==(
const
BlockCoordinates
&other)
const
{
12
return
(row == other.row) && (col == other.col);
13
}
14
};
15
16
using
BlockDimension
=
BlockCoordinates
;
17
}
// namespace graphite
18
19
namespace
std {
20
template
<>
struct
hash<graphite::BlockCoordinates> {
21
size_t
operator()(
const
graphite::BlockCoordinates
&bc)
const
{
22
size_t
seed = 0;
23
graphite::hash_combine(seed, bc.row);
24
graphite::hash_combine(seed, bc.col);
25
return
seed;
26
}
27
};
28
}
// namespace std
graphite::BlockCoordinates
Definition
block.hpp:6
utils.hpp
include
graphite
block.hpp
Generated by
1.9.8