HikoGUI
A low latency retained GUI
Loading...
Searching...
No Matches
src
hikogui
rapid
sfloat_rgba32x4.hpp
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
5
#pragma once
6
7
#include "numeric_array.hpp"
8
#include "../geometry/matrix.hpp"
9
#include <array>
10
11
namespace
hi::inline
v1
{
12
13
class
sfloat_rgba32x4
{
14
public
:
15
constexpr
sfloat_rgba32x4
() =
default
;
16
constexpr
sfloat_rgba32x4
(
sfloat_rgba32x4
const
& rhs)
noexcept
=
default
;
17
constexpr
sfloat_rgba32x4
(
sfloat_rgba32x4
&& rhs)
noexcept
=
default
;
18
constexpr
sfloat_rgba32x4
& operator=(
sfloat_rgba32x4
const
& rhs)
noexcept
=
default
;
19
constexpr
sfloat_rgba32x4
& operator=(
sfloat_rgba32x4
&& rhs)
noexcept
=
default
;
20
[[nodiscard]]
constexpr
friend
bool
operator==(
sfloat_rgba32x4
const
&,
sfloat_rgba32x4
const
&)
noexcept
=
default
;
21
22
constexpr
sfloat_rgba32x4
(
std::array<f32x4,4>
const
& rhs)
noexcept
23
{
24
for
(
auto
j = 0; j != 4; ++j) {
25
for
(
auto
i = 0; i != 4; ++i) {
26
_v[j*4 + i] = rhs[j][i];
27
}
28
}
29
}
30
31
constexpr
sfloat_rgba32x4
& operator=(
std::array<f32x4, 4>
const
& rhs)
noexcept
32
{
33
for
(
auto
j = 0; j != 4; ++j) {
34
for
(
auto
i = 0; i != 4; ++i) {
35
_v[j * 4 + i] = rhs[j][i];
36
}
37
}
38
return
*
this
;
39
}
40
41
constexpr
sfloat_rgba32x4
(
matrix3
const
& rhs) noexcept :
sfloat_rgba32x4
(
static_cast<
std::array<f32x4, 4>
>
(rhs)) {}
42
43
private
:
44
std::array<float, 16>
_v;
45
};
46
47
}
// namespace hi::inline v1
v1
DOXYGEN BUG.
Definition
algorithm.hpp:15
v1::geo::matrix< 3 >
v1::sfloat_rgba32x4
Definition
sfloat_rgba32x4.hpp:13
std::array
Generated on Mon Apr 22 2024 12:52:34 for HikoGUI by
1.10.0