Bläddra i källkod

Add IDENTITY constants for quat and simdQuat

- Why the hell am I not studying for the test I have tomorrow
Jesse Talavera-Greenberg 10 år sedan
förälder
incheckning
5eb7ad5d47
4 ändrade filer med 5 tillägg och 0 borttagningar
  1. 1 0
      glm/gtc/quaternion.hpp
  2. 2 0
      glm/gtc/quaternion.inl
  3. 1 0
      glm/gtx/simd_quat.hpp
  4. 1 0
      glm/gtx/simd_quat.inl

+ 1 - 0
glm/gtc/quaternion.hpp

@@ -78,6 +78,7 @@ namespace glm
 
 #		ifdef GLM_STATIC_CONST_MEMBERS
 		static const type ZERO;
+		static const type IDENTITY;
 		static const type X;
 		static const type Y;
 		static const type Z;

+ 2 - 0
glm/gtc/quaternion.inl

@@ -54,6 +54,8 @@ namespace detail
 	const tquat<T, P> tquat<T, P>::ZERO
 			(static_cast<T>(0), static_cast<T>(0), static_cast<T>(0), static_cast<T>(0));
 
+	template <typename T, precision P> const tquat<T, P> tquat<T, P>::IDENTITY;
+
 	template <typename T, precision P>
 	const tquat<T, P> tquat<T, P>::X
 			(static_cast<T>(0), static_cast<T>(1), static_cast<T>(0), static_cast<T>(0));

+ 1 - 0
glm/gtx/simd_quat.hpp

@@ -93,6 +93,7 @@ namespace detail
 
 #		ifdef GLM_STATIC_CONST_MEMBERS
 		static const type ZERO;
+		static const type IDENTITY;
 		static const type X;
 		static const type Y;
 		static const type Z;

+ 1 - 0
glm/gtx/simd_quat.inl

@@ -53,6 +53,7 @@ void print(const fvec4SIMD &v)
 
 #	ifdef GLM_STATIC_CONST_MEMBERS
 	const fquatSIMD fquatSIMD::ZERO(0, 0, 0, 0);
+	const fquatSIMD fquatSIMD::IDENTITY(1, 0, 0, 0);
 	const fquatSIMD fquatSIMD::X(0, 1, 0, 0);
 	const fquatSIMD fquatSIMD::Y(0, 0, 1, 0);
 	const fquatSIMD fquatSIMD::Z(0, 0, 0, 1);