ソースを参照

Add the ability to convert a SIMD quat to a standard mat4.

Dave Reid 12 年 前
コミット
d07496460a
2 ファイル変更13 行追加0 行削除
  1. 5 0
      glm/gtx/simd_quat.hpp
  2. 8 0
      glm/gtx/simd_quat.inl

+ 5 - 0
glm/gtx/simd_quat.hpp

@@ -189,6 +189,11 @@ namespace detail
     detail::fmat4x4SIMD mat4SIMD_cast(
         detail::fquatSIMD const & q);
 
+    //! Converts a simdQuat to a standard mat4.
+    //! (From GLM_GTX_simd_quat extension)
+    mat4 mat4_cast(
+        detail::fquatSIMD const & q);
+
 
 	/// Returns the length of the quaternion. 
 	/// 

+ 8 - 0
glm/gtx/simd_quat.inl

@@ -365,6 +365,14 @@ GLM_FUNC_QUALIFIER detail::fmat4x4SIMD mat4SIMD_cast
     return result;
 }
 
+GLM_FUNC_QUALIFIER mat4 mat4_cast
+(
+	detail::fquatSIMD const & q
+)
+{
+    return mat4_cast(mat4SIMD_cast(q));
+}
+
 
 
 GLM_FUNC_QUALIFIER float length