Go to the documentation of this file. 1 #ifndef EAGINE_MATH_MATRIX_REFLECTION_HPP
9 #define EAGINE_MATH_MATRIX_REFLECTION_HPP
17 template <
typename X,
int I>
21 template <
typename T,
int N,
bool RM,
bool V,
int I>
22 struct is_matrix_constructor<reflection_I<matrix<T, N, N, RM, V>, I>>
33 template <
typename T,
bool RM,
bool V,
int I>
34 class reflection_I<
matrix<T, 4, 4, RM, V>, I> {
39 : _v(r ? T(-1) : T(1)) {}
41 constexpr
auto v(
int i)
const noexcept -> T {
42 return (I == i) ? _v : T(1);
48 {{v(0), T(0), T(0), T(0)},
49 {T(0), v(1), T(0), T(0)},
50 {T(0), T(0), v(2), T(0)},
51 {T(0), T(0), T(0), T(1)}}};
59 template <
typename T,
int N,
bool RM1,
bool RM2,
bool V,
int I>
63 -> reflection_I<matrix<T, N, N, RM1, V>, I> {
64 return {(a._v < b._v) || (a._v > b._v)};
68 template <
typename T,
int N,
bool RM,
bool V,
int I>
70 reorder_mat_ctr(
const reflection_I<matrix<T, N, N, RM, V>, I>& c) noexcept
71 -> reflection_I<matrix<T, N, N, !RM, V>, I> {
100 template <
typename T,
bool V>
114 template <
typename T,
bool V>
128 template <
typename T,
bool V>
134 #endif // EAGINE_MATH_MATRIX_REFLECTION_HPP
reflection_I< M, 1 > reflection_y
Alias for implementation of constructor of reflection along y-axis matrix.
Definition: matrix_reflection.hpp:83
reflection_I< M, 2 > reflection_z
Alias for implementation of constructor of reflection along z-axis matrix.
Definition: matrix_reflection.hpp:88
Math-related code is placed in this namespace.
Definition: eagine.hpp:48
constexpr reflection_I(bool r=true) noexcept
Initializes the matrix constructor.
Definition: matrix_reflection.hpp:38
Helper class used in matrix constructor implementation.
Definition: matrix_ctr.hpp:74
constexpr auto operator()() const noexcept
Returns the constructed matrix.
Definition: matrix_reflection.hpp:46
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
reflection_I< M, 0 > reflection_x
Alias for implementation of constructor of reflection along x-axis matrix.
Definition: matrix_reflection.hpp:78
Basic RxC matrix implementation template.
Definition: fwd.hpp:25