HikoGUI
A low latency retained GUI
Loading...
Searching...
No Matches
identity.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 "matrix.hpp"
8
9namespace hi { inline namespace v1 {
10namespace geo {
11
12class identity {
13public:
14 constexpr identity(identity const&) noexcept = default;
15 constexpr identity(identity&&) noexcept = default;
16 constexpr identity& operator=(identity const&) noexcept = default;
17 constexpr identity& operator=(identity&&) noexcept = default;
18
19 constexpr identity() noexcept = default;
20
21 template<int E>
22 constexpr operator matrix<E>() const noexcept
23 {
24 return matrix<E>();
25 }
26
27 [[nodiscard]] identity operator~() const noexcept
28 {
29 return {};
30 }
31
32 template<int E>
33 [[nodiscard]] constexpr vector<E> operator*(vector<E> const& rhs) const noexcept
34 {
35 return rhs;
36 }
37
38 template<int E>
39 [[nodiscard]] constexpr point<E> operator*(point<E> const& rhs) const noexcept
40 {
41 return rhs;
42 }
43
44 [[nodiscard]] constexpr color operator*(color const& rhs) const noexcept
45 {
46 return rhs;
47 }
48
49 [[nodiscard]] constexpr axis_aligned_rectangle operator*(axis_aligned_rectangle const& rhs) const noexcept
50 {
51 return rhs;
52 }
53
54 [[nodiscard]] constexpr rectangle operator*(rectangle const& rhs) const noexcept
55 {
56 return rhs;
57 }
58
59 template<int E>
60 [[nodiscard]] constexpr identity operator*(identity const&) const noexcept
61 {
62 return {};
63 }
64
65 [[nodiscard]] constexpr bool is_valid() const noexcept
66 {
67 return true;
68 }
69};
70
71} // namespace geo
72
75
76}} // namespace hi::v1
@ rectangle
The gui_event has rectangle data.
DOXYGEN BUG.
Definition algorithm.hpp:15
The HikoGUI namespace.
Definition ascii.hpp:19
Definition identity.hpp:12