Parcourir la source

Bugfix: Removing isAffine() checks on matrices as they will sometimes trigger due to precision issues

BearishSun il y a 7 ans
Parent
commit
b26c29ef4e

+ 0 - 1
Source/BansheeCore/Renderer/BsCamera.cpp

@@ -379,7 +379,6 @@ namespace bs
 		mCustomViewMatrix = enable;
 		if (enable)
 		{
-			BS_ASSERT(viewMatrix.isAffine());
 			mViewMatrix = viewMatrix;
 			mViewMatrixInv = mViewMatrix.inverseAffine();
 		}

+ 0 - 2
Source/BansheeUtility/Math/BsAABox.cpp

@@ -171,8 +171,6 @@ namespace bs
 
 	void AABox::transformAffine(const Matrix4& m)
 	{
-		BS_ASSERT(m.isAffine());
-
 		Vector3 min = m.getTranslation();
 		Vector3 max = m.getTranslation();
 		for(UINT32 i = 0; i < 3; i++)

+ 0 - 2
Source/BansheeUtility/Math/BsMatrix4.cpp

@@ -134,8 +134,6 @@ namespace bs
 
 	Matrix4 Matrix4::inverseAffine() const
 	{
-		BS_ASSERT(isAffine());
-
 		float m10 = m[1][0], m11 = m[1][1], m12 = m[1][2];
 		float m20 = m[2][0], m21 = m[2][1], m22 = m[2][2];
 

+ 0 - 2
Source/BansheeUtility/Math/BsMatrix4.h

@@ -339,8 +339,6 @@ namespace bs
 		 */
 		Matrix4 concatenateAffine(const Matrix4 &other) const
 		{
-			BS_ASSERT(isAffine() && other.isAffine());
-
 			return Matrix4(
 				m[0][0] * other.m[0][0] + m[0][1] * other.m[1][0] + m[0][2] * other.m[2][0],
 				m[0][0] * other.m[0][1] + m[0][1] * other.m[1][1] + m[0][2] * other.m[2][1],

+ 1 - 1
Source/CMakeLists.txt

@@ -5,7 +5,7 @@ project (Banshee)
 set (BS_VERSION_MAJOR 0)
 set (BS_VERSION_MINOR 4)
 
-set (BS_PREBUILT_DEPENDENCIES_VERSION 20)
+set (BS_PREBUILT_DEPENDENCIES_VERSION 21)
 set (BS_SRC_DEPENDENCIES_VERSION 15)
 set (BS_BUILTIN_ASSETS_VERSION 3)