Remove redundant specializations of glm::type<mat</*...*/>>

This commit is contained in:
Yuri Kilochek 2017-12-26 19:37:25 +03:00
parent 1190ae0b0e
commit 7f162ff4e8

View File

@ -17,18 +17,7 @@
#endif #endif
// Dependency: // Dependency:
#include "../detail/type_vec2.hpp" #include "../detail/qualifier.hpp"
#include "../detail/type_vec3.hpp"
#include "../detail/type_vec4.hpp"
#include "../detail/type_mat2x2.hpp"
#include "../detail/type_mat2x3.hpp"
#include "../detail/type_mat2x4.hpp"
#include "../detail/type_mat3x2.hpp"
#include "../detail/type_mat3x3.hpp"
#include "../detail/type_mat3x4.hpp"
#include "../detail/type_mat4x2.hpp"
#include "../detail/type_mat4x3.hpp"
#include "../detail/type_mat4x4.hpp"
#include "../gtc/quaternion.hpp" #include "../gtc/quaternion.hpp"
#include "../gtx/dual_quaternion.hpp" #include "../gtx/dual_quaternion.hpp"
@ -64,130 +53,15 @@ namespace glm
}; };
}; };
template<typename T, qualifier Q> template<length_t C, length_t R, typename T, qualifier Q>
struct type<mat<2, 2, T, Q> > struct type<mat<C, R, T, Q> >
{ {
static bool const is_vec = false; static bool const is_vec = false;
static bool const is_mat = true; static bool const is_mat = true;
static bool const is_quat = false; static bool const is_quat = false;
enum static length_t const components = C;
{ static length_t const cols = C;
components = 2, static length_t const rows = R;
cols = 2,
rows = 2
};
};
template<typename T, qualifier Q>
struct type<mat<2, 3, T, Q> >
{
static bool const is_vec = false;
static bool const is_mat = true;
static bool const is_quat = false;
enum
{
components = 2,
cols = 2,
rows = 3
};
};
template<typename T, qualifier Q>
struct type<mat<2, 4, T, Q> >
{
static bool const is_vec = false;
static bool const is_mat = true;
static bool const is_quat = false;
enum
{
components = 2,
cols = 2,
rows = 4
};
};
template<typename T, qualifier Q>
struct type<mat<3, 2, T, Q> >
{
static bool const is_vec = false;
static bool const is_mat = true;
static bool const is_quat = false;
enum
{
components = 3,
cols = 3,
rows = 2
};
};
template<typename T, qualifier Q>
struct type<mat<3, 3, T, Q> >
{
static bool const is_vec = false;
static bool const is_mat = true;
static bool const is_quat = false;
enum
{
components = 3,
cols = 3,
rows = 3
};
};
template<typename T, qualifier Q>
struct type<mat<3, 4, T, Q> >
{
static bool const is_vec = false;
static bool const is_mat = true;
static bool const is_quat = false;
enum
{
components = 3,
cols = 3,
rows = 4
};
};
template<typename T, qualifier Q>
struct type<mat<4, 2, T, Q> >
{
static bool const is_vec = false;
static bool const is_mat = true;
static bool const is_quat = false;
enum
{
components = 4,
cols = 4,
rows = 2
};
};
template<typename T, qualifier Q>
struct type<mat<4, 3, T, Q> >
{
static bool const is_vec = false;
static bool const is_mat = true;
static bool const is_quat = false;
enum
{
components = 4,
cols = 4,
rows = 3
};
};
template<typename T, qualifier Q>
struct type<mat<4, 4, T, Q> >
{
static bool const is_vec = false;
static bool const is_mat = true;
static bool const is_quat = false;
enum
{
components = 4,
cols = 4,
rows = 4
};
}; };
template<typename T, qualifier Q> template<typename T, qualifier Q>