customize error rate for bind pose

pull/2536/head
thomasbiang 2019-07-10 16:27:59 -07:00 committed by ywang
parent 5a7c226c30
commit 8fc899035c
1 changed files with 6 additions and 1 deletions

View File

@ -68,6 +68,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <array>
#include <unordered_set>
#include <iostream> //wangyi
// RESOURCES:
// https://code.blender.org/2013/08/fbx-binary-file-format-specification/
// https://wiki.blender.org/index.php/User:Mont29/Foundation/FBX_File_Structure
@ -1840,7 +1842,10 @@ void FBXExporter::WriteObjects ()
// this should be the same as the bone's mOffsetMatrix.
// if it's not the same, the skeleton isn't in the bind pose.
const float epsilon = 1e-4f; // some error is to be expected
float epsilon = 1e-4f; // some error is to be expected
#ifdef ASSIMP_CUSTOM_BINDPOSE_ERR
epsilon = ASSIMP_CUSTOM_BINDPOSE_ERR;
#endif
bool bone_xform_okay = true;
if (b && ! tr.Equal(b->mOffsetMatrix, epsilon)) {
not_in_bind_pose.insert(b);