Go to the documentation of this file. 1 #ifndef EAGINE_MATH_MATRIX_TRANSLATION_HPP
9 #define EAGINE_MATH_MATRIX_TRANSLATION_HPP
20 template <
typename T,
int N,
bool RM,
bool V>
21 struct is_matrix_constructor<translation<matrix<T, N, N, RM, V>>>
29 template <
typename T,
bool RM,
bool V>
30 class translation<
matrix<T, 4, 4, RM, V>> {
32 constexpr translation(vect::data_t<T, 3, V> v) noexcept
49 -> translation<matrix<T, 4, 4, !RM, V>> {
54 constexpr
auto _make(std::true_type)
const noexcept {
55 return matrix<T, 4, 4, true, V>{
56 {{T(1), T(0), T(0), _v[0]},
57 {T(0), T(1), T(0), _v[1]},
58 {T(0), T(0), T(1), _v[2]},
59 {T(0), T(0), T(0), T(1)}}};
62 constexpr
auto _make(std::false_type)
const noexcept {
63 return matrix<T, 4, 4, false, V>{
64 {{T(1), T(0), T(0), T(0)},
65 {T(0), T(1), T(0), T(0)},
66 {T(0), T(0), T(1), T(0)},
67 {_v[0], _v[1], _v[2], T(1)}}};
70 vect::data_t<T, 3, V> _v;
74 template <
typename T,
int N,
bool RM1,
bool RM2,
bool V>
76 const translation<matrix<T, N, N, RM1, V>>& a,
77 const translation<matrix<T, N, N, RM2, V>>& b) noexcept
78 -> translation<matrix<T, N, N, RM1, V>> {
93 template <
typename T,
bool V>
99 #endif // EAGINE_MATH_MATRIX_TRANSLATION_HPP
constexpr auto operator()() const noexcept
Returns the constructed matrix.
Definition: matrix_translation.hpp:43
convertible_matrix_constructor< translation< matrix< T, 4, 4, true, V > >> matrix_translation
Alias for constructor of uniform translation transformation matrix.
Definition: matrix_translation.hpp:95
constexpr translation(T vx, T vy, T vz) noexcept
Initializes the matrix constructor.
Definition: matrix_translation.hpp:39
std::integral_constant< bool, B > bool_constant
Alias for boolean constant type.
Definition: int_constant.hpp:20
Math-related code is placed in this namespace.
Definition: eagine.hpp:48
Helper class used in matrix constructor implementation.
Definition: matrix_ctr.hpp:74
static auto multiply(const matrix< T, K, M, RM1, V > &m1, const matrix< T, N, K, RM2, V > &m2) noexcept -> matrix< T, N, M, RM1, V >
Matrix multiplication function.
Definition: matrix.hpp:529
Basic RxC matrix implementation template.
Definition: fwd.hpp:25