Added type to identify matrix, vector and quaternion at compile time

master
Christophe Riccio ago%!(EXTRA string=10 years)
parent fa18ca7c2e
commit d23d909e6d
  1. 8
      glm/detail/precision.hpp
  2. 10
      glm/detail/type_mat2x2.hpp
  3. 10
      glm/detail/type_mat2x3.hpp
  4. 10
      glm/detail/type_mat2x4.hpp
  5. 10
      glm/detail/type_mat3x2.hpp
  6. 10
      glm/detail/type_mat3x3.hpp
  7. 10
      glm/detail/type_mat3x4.hpp
  8. 10
      glm/detail/type_mat4x2.hpp
  9. 10
      glm/detail/type_mat4x3.hpp
  10. 10
      glm/detail/type_mat4x4.hpp
  11. 10
      glm/detail/type_vec1.hpp
  12. 10
      glm/detail/type_vec2.hpp
  13. 10
      glm/detail/type_vec3.hpp
  14. 10
      glm/detail/type_vec4.hpp
  15. 10
      glm/gtc/quaternion.hpp
  16. 10
      glm/gtx/dual_quaternion.hpp

@ -42,4 +42,12 @@ namespace glm
simd,
defaultp = highp
};
template <typename T, precision P, template <typename, precision> class genType>
struct type
{
static bool const is_vec = false;
static bool const is_mat = false;
static bool const is_quat = false;
};
}//namespace glm

@ -222,6 +222,16 @@ namespace glm
template <typename T, precision P>
GLM_FUNC_DECL bool operator!=(tmat2x2<T, P> const & m1, tmat2x2<T, P> const & m2);
// -- Is type --
template <typename T, precision P>
struct type<T, P, tmat2x2>
{
static bool const is_vec = false;
static bool const is_mat = true;
static bool const is_quat = false;
};
} //namespace glm
#ifndef GLM_EXTERNAL_TEMPLATE

@ -199,6 +199,16 @@ namespace glm
template <typename T, precision P>
GLM_FUNC_DECL bool operator!=(tmat2x3<T, P> const & m1, tmat2x3<T, P> const & m2);
// -- Is type --
template <typename T, precision P>
struct type<T, P, tmat2x3>
{
static bool const is_vec = false;
static bool const is_mat = true;
static bool const is_quat = false;
};
}//namespace glm
#ifndef GLM_EXTERNAL_TEMPLATE

@ -201,6 +201,16 @@ namespace glm
template <typename T, precision P>
GLM_FUNC_DECL bool operator!=(tmat2x4<T, P> const & m1, tmat2x4<T, P> const & m2);
// -- Is type --
template <typename T, precision P>
struct type<T, P, tmat2x4>
{
static bool const is_vec = false;
static bool const is_mat = true;
static bool const is_quat = false;
};
}//namespace glm
#ifndef GLM_EXTERNAL_TEMPLATE

@ -206,6 +206,16 @@ namespace glm
template <typename T, precision P>
GLM_FUNC_DECL bool operator!=(tmat3x2<T, P> const & m1, tmat3x2<T, P> const & m2);
// -- Is type --
template <typename T, precision P>
struct type<T, P, tmat3x2>
{
static bool const is_vec = false;
static bool const is_mat = true;
static bool const is_quat = false;
};
}//namespace glm
#ifndef GLM_EXTERNAL_TEMPLATE

@ -229,6 +229,16 @@ namespace glm
template <typename T, precision P>
GLM_FUNC_DECL bool operator!=(tmat3x3<T, P> const & m1, tmat3x3<T, P> const & m2);
// -- Is type --
template <typename T, precision P>
struct type<T, P, tmat3x3>
{
static bool const is_vec = false;
static bool const is_mat = true;
static bool const is_quat = false;
};
}//namespace glm
#ifndef GLM_EXTERNAL_TEMPLATE

@ -206,6 +206,16 @@ namespace glm
template <typename T, precision P>
GLM_FUNC_DECL bool operator!=(tmat3x4<T, P> const & m1, tmat3x4<T, P> const & m2);
// -- Is type --
template <typename T, precision P>
struct type<T, P, tmat3x4>
{
static bool const is_vec = false;
static bool const is_mat = true;
static bool const is_quat = false;
};
}//namespace glm
#ifndef GLM_EXTERNAL_TEMPLATE

@ -211,6 +211,16 @@ namespace glm
template <typename T, precision P>
GLM_FUNC_DECL bool operator!=(tmat4x2<T, P> const & m1, tmat4x2<T, P> const & m2);
// -- Is type --
template <typename T, precision P>
struct type<T, P, tmat4x2>
{
static bool const is_vec = false;
static bool const is_mat = true;
static bool const is_quat = false;
};
}//namespace glm
#ifndef GLM_EXTERNAL_TEMPLATE

@ -211,6 +211,16 @@ namespace glm
template <typename T, precision P>
GLM_FUNC_DECL bool operator!=(tmat4x3<T, P> const & m1, tmat4x3<T, P> const & m2);
// -- Is type --
template <typename T, precision P>
struct type<T, P, tmat4x3>
{
static bool const is_vec = false;
static bool const is_mat = true;
static bool const is_quat = false;
};
}//namespace glm
#ifndef GLM_EXTERNAL_TEMPLATE

@ -234,6 +234,16 @@ namespace glm
template <typename T, precision P>
GLM_FUNC_DECL bool operator!=(tmat4x4<T, P> const & m1, tmat4x4<T, P> const & m2);
// -- Is type --
template <typename T, precision P>
struct type<T, P, tmat4x4>
{
static bool const is_vec = false;
static bool const is_mat = true;
static bool const is_quat = false;
};
}//namespace glm
#ifndef GLM_EXTERNAL_TEMPLATE

@ -309,6 +309,16 @@ namespace glm
template <typename T, precision P>
GLM_FUNC_DECL bool operator!=(tvec1<T, P> const & v1, tvec1<T, P> const & v2);
// -- Is type --
template <typename T, precision P>
struct type<T, P, tvec1>
{
static bool const is_vec = true;
static bool const is_mat = false;
static bool const is_quat = false;
};
}//namespace glm
#ifndef GLM_EXTERNAL_TEMPLATE

@ -398,6 +398,16 @@ namespace glm
template <typename T, precision P>
GLM_FUNC_DECL bool operator!=(tvec2<T, P> const & v1, tvec2<T, P> const & v2);
// -- Is type --
template <typename T, precision P>
struct type<T, P, tvec2>
{
static bool const is_vec = true;
static bool const is_mat = false;
static bool const is_quat = false;
};
}//namespace glm
#ifndef GLM_EXTERNAL_TEMPLATE

@ -417,6 +417,16 @@ namespace glm
template <typename T, precision P>
GLM_FUNC_DECL bool operator!=(tvec3<T, P> const & v1, tvec3<T, P> const & v2);
// -- Is type --
template <typename T, precision P>
struct type<T, P, tvec3>
{
static bool const is_vec = true;
static bool const is_mat = false;
static bool const is_quat = false;
};
}//namespace glm
#ifndef GLM_EXTERNAL_TEMPLATE

@ -522,6 +522,16 @@ namespace detail
template <typename T, precision P>
GLM_FUNC_DECL bool operator!=(tvec4<T, P> const & v1, tvec4<T, P> const & v2);
// -- Is type --
template <typename T, precision P>
struct type<T, P, tvec4>
{
static bool const is_vec = true;
static bool const is_mat = false;
static bool const is_quat = false;
};
}//namespace glm
#ifndef GLM_EXTERNAL_TEMPLATE

@ -374,6 +374,16 @@ namespace glm
template <typename T, precision P>
GLM_FUNC_DECL tvec4<bool, P> notEqual(tquat<T, P> const & x, tquat<T, P> const & y);
/// @}
// -- Is type --
template <typename T, precision P>
struct type<T, P, tquat>
{
static bool const is_vec = false;
static bool const is_mat = false;
static bool const is_quat = true;
};
} //namespace glm
#include "quaternion.inl"

@ -292,6 +292,16 @@ namespace glm
#endif
/// @}
// -- Is type --
template <typename T, precision P, template <typename, precision> class genType>
struct type<T, P, tdualquat>
{
static bool is_vec = false;
static bool is_mat = false;
static bool is_quat = true;
};
} //namespace glm
#include "dual_quaternion.inl"

Loading…
Cancel
Save