HikoGUI
A low latency retained GUI
Loading...
Searching...
No Matches
src
hikogui
geometry
axis.hpp
Go to the documentation of this file.
1
// Copyright Take Vos 2021.
2
// Distributed under the Boost Software License, Version 1.0.
3
// (See accompanying file LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt)
4
8
#pragma once
9
10
namespace
hi
{
11
inline
namespace
v1
{
12
18
enum class
axis
:
unsigned
char
{
19
none = 0,
20
x = 1,
21
y = 2,
22
z = 4,
23
both = x | y,
24
all = x | y | z,
25
26
horizontal = x,
27
vertical = y,
28
};
29
33
[[nodiscard]]
constexpr
axis
operator&(
axis
const
&lhs,
axis
const
&rhs)
noexcept
34
{
35
return
static_cast<
axis
>
(
static_cast<
unsigned
char
>
(lhs) &
static_cast<
unsigned
char
>
(rhs));
36
}
37
41
[[nodiscard]]
constexpr
axis
operator|(
axis
const
&lhs,
axis
const
&rhs)
noexcept
42
{
43
return
static_cast<
axis
>
(
static_cast<
unsigned
char
>
(lhs) |
static_cast<
unsigned
char
>
(rhs));
44
}
45
49
[[nodiscard]]
constexpr
bool
to_bool(
axis
const
& rhs)
noexcept
50
{
51
return
to_bool(
static_cast<
unsigned
char
>
(rhs));
52
}
53
54
}}
// namespace hi::inline v1
hi::v1::axis
axis
An enumeration of the 3 axis for 3D geometry.
Definition
axis.hpp:18
v1
DOXYGEN BUG.
Definition
algorithm.hpp:13
hi
geometry/margins.hpp
Definition
cache.hpp:11
Generated on Mon Apr 22 2024 12:52:30 for HikoGUI by
1.10.0