Added GLM_META_PROG_HELPERS #350
This commit is contained in:
parent
47deb9709c
commit
38c9cd6cba
@ -54,17 +54,19 @@ namespace glm
|
|||||||
template <typename U, precision Q>
|
template <typename U, precision Q>
|
||||||
friend tvec2<U, Q> operator/(tvec2<U, Q> const & v, tmat2x2<U, Q> const & m);
|
friend tvec2<U, Q> operator/(tvec2<U, Q> const & v, tmat2x2<U, Q> const & m);
|
||||||
|
|
||||||
|
# if GLM_META_PROG_HELPERS
|
||||||
# if GLM_HAS_CONSTEXPR
|
# if GLM_HAS_CONSTEXPR
|
||||||
static GLM_CONSTEXPR length_t components = 2;
|
static GLM_CONSTEXPR length_t components = 2;
|
||||||
static GLM_CONSTEXPR length_t cols = 2;
|
static GLM_CONSTEXPR length_t columns = 2;
|
||||||
static GLM_CONSTEXPR length_t rows = 2;
|
static GLM_CONSTEXPR length_t rows = 2;
|
||||||
static GLM_CONSTEXPR precision prec = P;
|
static GLM_CONSTEXPR precision prec = P;
|
||||||
# else
|
# else
|
||||||
static const length_t components = 2;
|
static const length_t components = 2;
|
||||||
static const length_t cols = 2;
|
static const length_t columns = 2;
|
||||||
static const length_t rows = 2;
|
static const length_t rows = 2;
|
||||||
static const precision prec = P;
|
static const precision prec = P;
|
||||||
# endif
|
# endif//GLM_HAS_CONSTEXPR
|
||||||
|
# endif//GLM_META_PROG_HELPERS
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/// @cond DETAIL
|
/// @cond DETAIL
|
||||||
|
@ -50,6 +50,7 @@ namespace glm
|
|||||||
typedef tmat3x2<T, P> transpose_type;
|
typedef tmat3x2<T, P> transpose_type;
|
||||||
typedef T value_type;
|
typedef T value_type;
|
||||||
|
|
||||||
|
# if GLM_META_PROG_HELPERS
|
||||||
# if GLM_HAS_CONSTEXPR
|
# if GLM_HAS_CONSTEXPR
|
||||||
static GLM_CONSTEXPR length_t components = 2;
|
static GLM_CONSTEXPR length_t components = 2;
|
||||||
static GLM_CONSTEXPR length_t cols = 3;
|
static GLM_CONSTEXPR length_t cols = 3;
|
||||||
@ -60,7 +61,8 @@ namespace glm
|
|||||||
static const length_t cols = 3;
|
static const length_t cols = 3;
|
||||||
static const length_t rows = 2;
|
static const length_t rows = 2;
|
||||||
static const precision prec = P;
|
static const precision prec = P;
|
||||||
# endif
|
# endif//GLM_HAS_CONSTEXPR
|
||||||
|
# endif//GLM_META_PROG_HELPERS
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/// @cond DETAIL
|
/// @cond DETAIL
|
||||||
|
@ -50,6 +50,7 @@ namespace glm
|
|||||||
typedef tmat4x2<T, P> transpose_type;
|
typedef tmat4x2<T, P> transpose_type;
|
||||||
typedef T value_type;
|
typedef T value_type;
|
||||||
|
|
||||||
|
# if GLM_META_PROG_HELPERS
|
||||||
# if GLM_HAS_CONSTEXPR
|
# if GLM_HAS_CONSTEXPR
|
||||||
static GLM_CONSTEXPR length_t components = 2;
|
static GLM_CONSTEXPR length_t components = 2;
|
||||||
static GLM_CONSTEXPR length_t cols = 4;
|
static GLM_CONSTEXPR length_t cols = 4;
|
||||||
@ -61,6 +62,7 @@ namespace glm
|
|||||||
static const length_t rows = 2;
|
static const length_t rows = 2;
|
||||||
static const precision prec = P;
|
static const precision prec = P;
|
||||||
# endif
|
# endif
|
||||||
|
# endif//GLM_META_PROG_HELPERS
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/// @cond DETAIL
|
/// @cond DETAIL
|
||||||
|
@ -50,6 +50,7 @@ namespace glm
|
|||||||
typedef tmat2x3<T, P> transpose_type;
|
typedef tmat2x3<T, P> transpose_type;
|
||||||
typedef T value_type;
|
typedef T value_type;
|
||||||
|
|
||||||
|
# if GLM_META_PROG_HELPERS
|
||||||
# if GLM_HAS_CONSTEXPR
|
# if GLM_HAS_CONSTEXPR
|
||||||
static GLM_CONSTEXPR length_t components = 3;
|
static GLM_CONSTEXPR length_t components = 3;
|
||||||
static GLM_CONSTEXPR length_t cols = 2;
|
static GLM_CONSTEXPR length_t cols = 2;
|
||||||
@ -60,7 +61,8 @@ namespace glm
|
|||||||
static const length_t cols = 2;
|
static const length_t cols = 2;
|
||||||
static const length_t rows = 3;
|
static const length_t rows = 3;
|
||||||
static const precision prec = P;
|
static const precision prec = P;
|
||||||
# endif
|
# endif//GLM_HAS_CONSTEXPR
|
||||||
|
# endif//GLM_META_PROG_HELPERS
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/// @cond DETAIL
|
/// @cond DETAIL
|
||||||
|
@ -50,6 +50,7 @@ namespace glm
|
|||||||
typedef tmat4x3<T, P> transpose_type;
|
typedef tmat4x3<T, P> transpose_type;
|
||||||
typedef T value_type;
|
typedef T value_type;
|
||||||
|
|
||||||
|
# if GLM_META_PROG_HELPERS
|
||||||
# if GLM_HAS_CONSTEXPR
|
# if GLM_HAS_CONSTEXPR
|
||||||
static GLM_CONSTEXPR length_t components = 3;
|
static GLM_CONSTEXPR length_t components = 3;
|
||||||
static GLM_CONSTEXPR length_t cols = 4;
|
static GLM_CONSTEXPR length_t cols = 4;
|
||||||
@ -60,7 +61,8 @@ namespace glm
|
|||||||
static const length_t cols = 4;
|
static const length_t cols = 4;
|
||||||
static const length_t rows = 3;
|
static const length_t rows = 3;
|
||||||
static const precision prec = P;
|
static const precision prec = P;
|
||||||
# endif
|
# endif//GLM_HAS_CONSTEXPR
|
||||||
|
# endif//GLM_META_PROG_HELPERS
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/// @cond DETAIL
|
/// @cond DETAIL
|
||||||
|
@ -50,6 +50,7 @@ namespace glm
|
|||||||
typedef tmat2x4<T, P> transpose_type;
|
typedef tmat2x4<T, P> transpose_type;
|
||||||
typedef T value_type;
|
typedef T value_type;
|
||||||
|
|
||||||
|
# if GLM_META_PROG_HELPERS
|
||||||
# if GLM_HAS_CONSTEXPR
|
# if GLM_HAS_CONSTEXPR
|
||||||
static GLM_CONSTEXPR length_t components = 4;
|
static GLM_CONSTEXPR length_t components = 4;
|
||||||
static GLM_CONSTEXPR length_t cols = 2;
|
static GLM_CONSTEXPR length_t cols = 2;
|
||||||
@ -60,7 +61,8 @@ namespace glm
|
|||||||
static const length_t cols = 2;
|
static const length_t cols = 2;
|
||||||
static const length_t rows = 4;
|
static const length_t rows = 4;
|
||||||
static const precision prec = P;
|
static const precision prec = P;
|
||||||
# endif
|
# endif//GLM_HAS_CONSTEXPR
|
||||||
|
# endif//GLM_META_PROG_HELPERS
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/// @cond DETAIL
|
/// @cond DETAIL
|
||||||
|
@ -50,6 +50,7 @@ namespace glm
|
|||||||
typedef tmat3x4<T, P> transpose_type;
|
typedef tmat3x4<T, P> transpose_type;
|
||||||
typedef T value_type;
|
typedef T value_type;
|
||||||
|
|
||||||
|
# if GLM_META_PROG_HELPERS
|
||||||
# if GLM_HAS_CONSTEXPR
|
# if GLM_HAS_CONSTEXPR
|
||||||
static GLM_CONSTEXPR length_t components = 4;
|
static GLM_CONSTEXPR length_t components = 4;
|
||||||
static GLM_CONSTEXPR length_t cols = 3;
|
static GLM_CONSTEXPR length_t cols = 3;
|
||||||
@ -60,7 +61,8 @@ namespace glm
|
|||||||
static const length_t cols = 3;
|
static const length_t cols = 3;
|
||||||
static const length_t rows = 4;
|
static const length_t rows = 4;
|
||||||
static const precision prec = P;
|
static const precision prec = P;
|
||||||
# endif
|
# endif//GLM_HAS_CONSTEXPR
|
||||||
|
# endif//GLM_META_PROG_HELPERS
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Data
|
// Data
|
||||||
|
@ -49,6 +49,7 @@ namespace glm
|
|||||||
typedef tmat4x4<T, P> transpose_type;
|
typedef tmat4x4<T, P> transpose_type;
|
||||||
typedef T value_type;
|
typedef T value_type;
|
||||||
|
|
||||||
|
# if GLM_META_PROG_HELPERS
|
||||||
# if GLM_HAS_CONSTEXPR
|
# if GLM_HAS_CONSTEXPR
|
||||||
static GLM_CONSTEXPR length_t components = 4;
|
static GLM_CONSTEXPR length_t components = 4;
|
||||||
static GLM_CONSTEXPR length_t cols = 4;
|
static GLM_CONSTEXPR length_t cols = 4;
|
||||||
@ -59,7 +60,8 @@ namespace glm
|
|||||||
static const length_t cols = 4;
|
static const length_t cols = 4;
|
||||||
static const length_t rows = 4;
|
static const length_t rows = 4;
|
||||||
static const precision prec = P;
|
static const precision prec = P;
|
||||||
# endif
|
# endif//GLM_HAS_CONSTEXPR
|
||||||
|
# endif//GLM_META_PROG_HELPERS
|
||||||
|
|
||||||
template <typename U, precision Q>
|
template <typename U, precision Q>
|
||||||
friend tvec4<U, Q> operator/(tmat4x4<U, Q> const & m, tvec4<U, Q> const & v);
|
friend tvec4<U, Q> operator/(tmat4x4<U, Q> const & m, tvec4<U, Q> const & v);
|
||||||
|
@ -54,13 +54,17 @@ namespace glm
|
|||||||
typedef tvec1<T, P> type;
|
typedef tvec1<T, P> type;
|
||||||
typedef tvec1<bool, P> bool_type;
|
typedef tvec1<bool, P> bool_type;
|
||||||
typedef T value_type;
|
typedef T value_type;
|
||||||
|
|
||||||
|
# if GLM_META_PROG_HELPERS
|
||||||
# if GLM_HAS_CONSTEXPR
|
# if GLM_HAS_CONSTEXPR
|
||||||
static GLM_CONSTEXPR length_t components = 1;
|
static GLM_CONSTEXPR length_t components = 1;
|
||||||
static GLM_CONSTEXPR precision prec = P;
|
static GLM_CONSTEXPR precision precision = P;
|
||||||
# else
|
# else
|
||||||
static const length_t components = 1;
|
static const length_t components = 1;
|
||||||
static const precision prec = P;
|
static const precision precision = P;
|
||||||
# endif
|
# endif
|
||||||
|
# endif//GLM_META_PROG_HELPERS
|
||||||
|
|
||||||
//////////////////////////////////////
|
//////////////////////////////////////
|
||||||
// Data
|
// Data
|
||||||
|
|
||||||
|
@ -54,13 +54,16 @@ namespace glm
|
|||||||
typedef tvec2<T, P> type;
|
typedef tvec2<T, P> type;
|
||||||
typedef tvec2<bool, P> bool_type;
|
typedef tvec2<bool, P> bool_type;
|
||||||
typedef T value_type;
|
typedef T value_type;
|
||||||
|
|
||||||
|
# if GLM_META_PROG_HELPERS
|
||||||
# if GLM_HAS_CONSTEXPR
|
# if GLM_HAS_CONSTEXPR
|
||||||
static GLM_CONSTEXPR length_t components = 2;
|
static GLM_CONSTEXPR length_t components = 2;
|
||||||
static GLM_CONSTEXPR precision prec = P;
|
static GLM_CONSTEXPR precision prec = P;
|
||||||
# else
|
# else
|
||||||
static const length_t components = 2;
|
static const length_t components = 2;
|
||||||
static const precision prec = P;
|
static const precision prec = P;
|
||||||
# endif
|
# endif//GLM_HAS_CONSTEXPR
|
||||||
|
# endif//GLM_META_PROG_HELPERS
|
||||||
|
|
||||||
//////////////////////////////////////
|
//////////////////////////////////////
|
||||||
// Data
|
// Data
|
||||||
|
@ -54,13 +54,16 @@ namespace glm
|
|||||||
typedef tvec3<T, P> type;
|
typedef tvec3<T, P> type;
|
||||||
typedef tvec3<bool, P> bool_type;
|
typedef tvec3<bool, P> bool_type;
|
||||||
typedef T value_type;
|
typedef T value_type;
|
||||||
|
|
||||||
|
# if GLM_META_PROG_HELPERS
|
||||||
# if GLM_HAS_CONSTEXPR
|
# if GLM_HAS_CONSTEXPR
|
||||||
static GLM_CONSTEXPR length_t components = 3;
|
static GLM_CONSTEXPR length_t components = 3;
|
||||||
static GLM_CONSTEXPR precision prec = P;
|
static GLM_CONSTEXPR precision prec = P;
|
||||||
# else
|
# else
|
||||||
static const length_t components = 3;
|
static const length_t components = 3;
|
||||||
static const precision prec = P;
|
static const precision prec = P;
|
||||||
# endif
|
# endif//GLM_HAS_CONSTEXPR
|
||||||
|
# endif//GLM_META_PROG_HELPERS
|
||||||
|
|
||||||
//////////////////////////////////////
|
//////////////////////////////////////
|
||||||
// Data
|
// Data
|
||||||
|
@ -108,13 +108,16 @@ namespace detail
|
|||||||
typedef tvec4<T, P> type;
|
typedef tvec4<T, P> type;
|
||||||
typedef tvec4<bool, P> bool_type;
|
typedef tvec4<bool, P> bool_type;
|
||||||
typedef T value_type;
|
typedef T value_type;
|
||||||
|
|
||||||
|
# if GLM_META_PROG_HELPERS
|
||||||
# if GLM_HAS_CONSTEXPR
|
# if GLM_HAS_CONSTEXPR
|
||||||
static GLM_CONSTEXPR length_t components = 4;
|
static GLM_CONSTEXPR length_t components = 4;
|
||||||
static GLM_CONSTEXPR precision prec = P;
|
static GLM_CONSTEXPR precision prec = P;
|
||||||
# else
|
# else
|
||||||
static const length_t components = 4;
|
static const length_t components = 4;
|
||||||
static const precision prec = P;
|
static const precision prec = P;
|
||||||
# endif
|
# endif//GLM_HAS_CONSTEXPR
|
||||||
|
# endif//GLM_META_PROG_HELPERS
|
||||||
|
|
||||||
//////////////////////////////////////
|
//////////////////////////////////////
|
||||||
// Data
|
// Data
|
||||||
|
@ -64,13 +64,16 @@ namespace glm
|
|||||||
{
|
{
|
||||||
typedef tquat<T, P> type;
|
typedef tquat<T, P> type;
|
||||||
typedef T value_type;
|
typedef T value_type;
|
||||||
|
|
||||||
|
# if GLM_META_PROG_HELPERS
|
||||||
# if GLM_HAS_CONSTEXPR
|
# if GLM_HAS_CONSTEXPR
|
||||||
static GLM_CONSTEXPR length_t components = 4;
|
static GLM_CONSTEXPR length_t components = 4;
|
||||||
static GLM_CONSTEXPR precision prec = P;
|
static GLM_CONSTEXPR precision prec = P;
|
||||||
# else
|
# else
|
||||||
static const length_t components = 4;
|
static const length_t components = 4;
|
||||||
static const precision prec = P;
|
static const precision prec = P;
|
||||||
# endif
|
# endif//GLM_HAS_CONSTEXPR
|
||||||
|
# endif//GLM_META_PROG_HELPERS
|
||||||
|
|
||||||
public:
|
public:
|
||||||
T x, y, z, w;
|
T x, y, z, w;
|
||||||
|
@ -63,13 +63,16 @@ namespace glm
|
|||||||
{
|
{
|
||||||
typedef T value_type;
|
typedef T value_type;
|
||||||
typedef glm::tquat<T, P> part_type;
|
typedef glm::tquat<T, P> part_type;
|
||||||
|
|
||||||
|
# if GLM_META_PROG_HELPERS
|
||||||
# if GLM_HAS_CONSTEXPR
|
# if GLM_HAS_CONSTEXPR
|
||||||
static GLM_CONSTEXPR length_t components = 8;
|
static GLM_CONSTEXPR length_t components = 8;
|
||||||
static GLM_CONSTEXPR precision prec = P;
|
static GLM_CONSTEXPR precision prec = P;
|
||||||
# else
|
# else
|
||||||
static const length_t components = 8;
|
static const length_t components = 8;
|
||||||
static const precision prec = P;
|
static const precision prec = P;
|
||||||
# endif
|
# endif//GLM_HAS_CONSTEXPR
|
||||||
|
# endif//GLM_META_PROG_HELPERS
|
||||||
|
|
||||||
public:
|
public:
|
||||||
glm::tquat<T, P> real, dual;
|
glm::tquat<T, P> real, dual;
|
||||||
|
@ -71,6 +71,7 @@ namespace detail
|
|||||||
typedef fmat4x4SIMD type;
|
typedef fmat4x4SIMD type;
|
||||||
typedef fmat4x4SIMD transpose_type;
|
typedef fmat4x4SIMD transpose_type;
|
||||||
|
|
||||||
|
# if GLM_META_PROG_HELPERS
|
||||||
# if GLM_HAS_CONSTEXPR
|
# if GLM_HAS_CONSTEXPR
|
||||||
static GLM_CONSTEXPR length_t components = 4;
|
static GLM_CONSTEXPR length_t components = 4;
|
||||||
static GLM_CONSTEXPR length_t cols = 4;
|
static GLM_CONSTEXPR length_t cols = 4;
|
||||||
@ -81,7 +82,8 @@ namespace detail
|
|||||||
static const length_t cols = 4;
|
static const length_t cols = 4;
|
||||||
static const length_t rows = 4;
|
static const length_t rows = 4;
|
||||||
static const precision prec = defaultp;
|
static const precision prec = defaultp;
|
||||||
# endif
|
# endif//GLM_HAS_CONSTEXPR
|
||||||
|
# endif//GLM_META_PROG_HELPERS
|
||||||
|
|
||||||
GLM_FUNC_DECL length_t length() const;
|
GLM_FUNC_DECL length_t length() const;
|
||||||
|
|
||||||
|
@ -75,13 +75,16 @@ namespace detail
|
|||||||
|
|
||||||
typedef fquatSIMD type;
|
typedef fquatSIMD type;
|
||||||
typedef tquat<bool, defaultp> bool_type;
|
typedef tquat<bool, defaultp> bool_type;
|
||||||
|
|
||||||
|
# if GLM_META_PROG_HELPERS
|
||||||
# if GLM_HAS_CONSTEXPR
|
# if GLM_HAS_CONSTEXPR
|
||||||
static GLM_CONSTEXPR length_t components = 4;
|
static GLM_CONSTEXPR length_t components = 4;
|
||||||
static GLM_CONSTEXPR precision prec = defaultp;
|
static GLM_CONSTEXPR precision prec = defaultp;
|
||||||
# else
|
# else
|
||||||
static const length_t components = 4;
|
static const length_t components = 4;
|
||||||
static const precision prec = defaultp;
|
static const precision prec = defaultp;
|
||||||
# endif
|
# endif//GLM_HAS_CONSTEXPR
|
||||||
|
# endif//GLM_META_PROG_HELPERS
|
||||||
|
|
||||||
#ifdef GLM_SIMD_ENABLE_XYZW_UNION
|
#ifdef GLM_SIMD_ENABLE_XYZW_UNION
|
||||||
union
|
union
|
||||||
|
@ -98,13 +98,16 @@ namespace detail
|
|||||||
|
|
||||||
typedef fvec4SIMD type;
|
typedef fvec4SIMD type;
|
||||||
typedef tvec4<bool, highp> bool_type;
|
typedef tvec4<bool, highp> bool_type;
|
||||||
|
|
||||||
|
# if GLM_META_PROG_HELPERS
|
||||||
# if GLM_HAS_CONSTEXPR
|
# if GLM_HAS_CONSTEXPR
|
||||||
static GLM_CONSTEXPR length_t components = 4;
|
static GLM_CONSTEXPR length_t components = 4;
|
||||||
static GLM_CONSTEXPR precision prec = defaultp;
|
static GLM_CONSTEXPR precision prec = defaultp;
|
||||||
# else
|
# else
|
||||||
static const length_t components = 4;
|
static const length_t components = 4;
|
||||||
static const precision prec = defaultp;
|
static const precision prec = defaultp;
|
||||||
# endif
|
# endif//GLM_HAS_CONSTEXPR
|
||||||
|
# endif//GLM_META_PROG_HELPERS
|
||||||
|
|
||||||
#ifdef GLM_SIMD_ENABLE_XYZW_UNION
|
#ifdef GLM_SIMD_ENABLE_XYZW_UNION
|
||||||
union
|
union
|
||||||
|
@ -58,6 +58,7 @@ glm::mat4 camera(float Translate, glm::vec2 const & Rotate)
|
|||||||
- Added functions eulerAngleXYZ and extractEulerAngleXYZ #311
|
- Added functions eulerAngleXYZ and extractEulerAngleXYZ #311
|
||||||
- Added <glm/gtx/hash.hpp> to perform std::hash on GLM types #320
|
- Added <glm/gtx/hash.hpp> to perform std::hash on GLM types #320
|
||||||
- Added <glm/gtx/wrap.hpp> for texcoord wrapping
|
- Added <glm/gtx/wrap.hpp> for texcoord wrapping
|
||||||
|
- Added static components and precision members to all vector and quat types #350
|
||||||
|
|
||||||
##### Improvements:
|
##### Improvements:
|
||||||
- Changed usage of __has_include to support Intel compiler #307
|
- Changed usage of __has_include to support Intel compiler #307
|
||||||
|
Loading…
x
Reference in New Issue
Block a user