Bug in get inverse matrix
Posted: Fri Nov 14, 2008 5:18 am
In CMatrix4<T>::getInverse, when to determine whether the determinant of the matrix is zero, the tolerance, ROUNDING_ERROR_32 which is 0.000001f, is too big. Assumpt that one object is scaled to 1/1000, then the transform matrix is {0.001, 0, 0, 0, 0, 0.001, 0, 0, 0, 0, 0.001, 0, 0, 0, 0, 1}, then it's determinant is 1e-9. But it's not zero. Right?
You can test it with scene in which all of objects are scaled to 1/1000. Then use ISceneCollisionManager::getSceneNodeFromRayBB to select one object. The result is that nothing is selected. It's because getInverse is used in getSceneNodeFromRayBB.
But which value is suitable?
You can test it with scene in which all of objects are scaled to 1/1000. Then use ISceneCollisionManager::getSceneNodeFromRayBB to select one object. The result is that nothing is selected. It's because getInverse is used in getSceneNodeFromRayBB.
But which value is suitable?