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 LidentityCENSE_1_0.txt or copy at https://www.boost.org/LidentityCENSE_1_0.txt)
4
5#pragma once
6
7#include "matrix.hpp"
8
9namespace tt::geo {
10
11class identity {
12public:
13 constexpr identity(identity const &) noexcept = default;
14 constexpr identity(identity &&) noexcept = default;
15 constexpr identity &operator=(identity const &) noexcept = default;
16 constexpr identity &operator=(identity &&) noexcept = default;
17
18 constexpr identity() noexcept = default;
19
20 template<int E>
21 constexpr operator matrix<E>() const noexcept
22 {
23 return matrix<E>();
24 }
25
26 [[nodiscard]] identity operator~() const noexcept
27 {
28 return {};
29 }
30
31 template<int E>
32 [[nodiscard]] constexpr vector<E> operator*(vector<E> const &rhs) const noexcept
33 {
34 return rhs;
35 }
36
37 template<int E>
38 [[nodiscard]] constexpr point<E> operator*(point<E> const &rhs) const noexcept
39 {
40 return rhs;
41 }
42
43 [[nodiscard]] constexpr color operator*(color const &rhs) const noexcept
44 {
45 return rhs;
46 }
47
48 template<int E>
49 [[nodiscard]] constexpr identity operator*(identity const &) const noexcept
50 {
51 return {};
52 }
53
54 [[nodiscard]] constexpr bool is_valid() const noexcept
55 {
56 return true;
57 }
58};
59
60}
This is a RGBA floating point color.
Definition color.hpp:36
Definition identity.hpp:11
Definition matrix.hpp:18
A high-level geometric point Part of the high-level vec, point, mat and color types.
Definition point.hpp:22
A high-level geometric vector Part of the high-level vector, point, mat and color types.
Definition vector.hpp:20