Wrap tquat's, simdQuat's and simdVec4's static constants in GLM_STATIC_CONST_MEMBERS

- Also, fixed indentation
master
Jesse Talavera-Greenberg ago%!(EXTRA string=10 years)
parent 5df08dfc78
commit d1cdb46cfb
  1. 2
      glm/gtc/quaternion.hpp
  2. 2
      glm/gtc/quaternion.inl
  3. 2
      glm/gtx/simd_quat.hpp
  4. 3
      glm/gtx/simd_quat.inl
  5. 2
      glm/gtx/simd_vec4.hpp
  6. 2
      glm/gtx/simd_vec4.inl
  7. 2
      test/gtx/gtx_simd_vec4.cpp

@ -76,6 +76,7 @@ namespace glm
T x, y, z, w;
# ifdef GLM_STATIC_CONST_MEMBERS
static const type ZERO;
static const type X;
static const type Y;
@ -92,6 +93,7 @@ namespace glm
static const type XZW;
static const type YZW;
static const type XYZW;
# endif
// -- Component accesses --

@ -49,6 +49,7 @@ namespace detail
};
}//namespace detail
# ifdef GLM_STATIC_CONST_MEMBERS
template <typename T, precision P>
const tquat<T, P> tquat<T, P>::ZERO =
tquat<T, P>(static_cast<T>(0), static_cast<T>(0), static_cast<T>(0), static_cast<T>(0));
@ -112,6 +113,7 @@ const tquat<T, P> tquat<T, P>::YZW =
template <typename T, precision P>
const tquat<T, P> tquat<T, P>::XYZW =
tquat<T, P>(static_cast<T>(1), static_cast<T>(1), static_cast<T>(1), static_cast<T>(1));
# endif
// -- Component accesses --
# ifdef GLM_FORCE_SIZE_FUNC

@ -91,6 +91,7 @@ namespace detail
__m128 Data;
#endif
# ifdef GLM_STATIC_CONST_MEMBERS
static const type ZERO;
static const type X;
static const type Y;
@ -107,6 +108,7 @@ namespace detail
static const type XZW;
static const type YZW;
static const type XYZW;
# endif
//////////////////////////////////////
// Implicit basic constructors

@ -51,6 +51,7 @@ void print(const fvec4SIMD &v)
}
#endif
# ifdef GLM_STATIC_CONST_MEMBERS
const fquatSIMD fquatSIMD::ZERO = fquatSIMD(0, 0, 0, 0);
const fquatSIMD fquatSIMD::X = fquatSIMD(0, 1, 0, 0);
const fquatSIMD fquatSIMD::Y = fquatSIMD(0, 0, 1, 0);
@ -67,7 +68,7 @@ const fquatSIMD fquatSIMD::XYW = fquatSIMD(1, 1, 1, 0);
const fquatSIMD fquatSIMD::XZW = fquatSIMD(1, 1, 0, 1);
const fquatSIMD fquatSIMD::YZW = fquatSIMD(1, 0, 1, 1);
const fquatSIMD fquatSIMD::XYZW = fquatSIMD(1, 1, 1, 1);
# endif
//////////////////////////////////////
// Implicit basic constructors

@ -114,6 +114,7 @@ namespace detail
__m128 Data;
#endif
# ifdef GLM_STATIC_CONST_MEMBERS
static const type ZERO;
static const type X;
static const type Y;
@ -130,6 +131,7 @@ namespace detail
static const type XZW;
static const type YZW;
static const type XYZW;
# endif
//////////////////////////////////////
// Implicit basic constructors

@ -16,6 +16,7 @@ struct shuffle_mask
enum{value = Value};
};
# ifdef GLM_STATIC_CONST_MEMBERS
const fvec4SIMD fvec4SIMD::ZERO = fvec4SIMD(0, 0, 0, 0);
const fvec4SIMD fvec4SIMD::X = fvec4SIMD(1, 0, 0, 0);
const fvec4SIMD fvec4SIMD::Y = fvec4SIMD(0, 1, 0, 0);
@ -32,6 +33,7 @@ const fvec4SIMD fvec4SIMD::XYW = fvec4SIMD(1, 1, 0, 1);
const fvec4SIMD fvec4SIMD::XZW = fvec4SIMD(1, 0, 1, 1);
const fvec4SIMD fvec4SIMD::YZW = fvec4SIMD(0, 1, 1, 1);
const fvec4SIMD fvec4SIMD::XYZW = fvec4SIMD(1, 1, 1, 1);
# endif
//////////////////////////////////////
// Implicit basic constructors

@ -29,6 +29,8 @@
/// @author Christophe Riccio
///////////////////////////////////////////////////////////////////////////////////
#define GLM_STATIC_CONST_MEMBERS
#include <glm/glm.hpp>
#include <glm/gtx/simd_vec4.hpp>
#include <cstdio>

Loading…
Cancel
Save