|
AMFP Enhanced
C++ reference: the code this unofficial fork added
|
split a bone matrix into translation, rotation and scale the way the Autodesk FBX SDK did (KFbxXMatrix GetT / GetR / GetS), so the ufbx loader reproduces the original loader's rest poses and keys. More...
#include <cmath>Go to the source code of this file.
Classes | |
| struct | hpl::FbxTrs |
Namespaces | |
| namespace | hpl |
Functions | |
| FbxTrs | hpl::FbxDecomposeSdk (const double m[3][4]) |
| void | hpl::FbxRotationToQuat (const double r[3][3], double q[4]) |
| Rotation matrix -> quaternion (w, x, y, z). | |
split a bone matrix into translation, rotation and scale the way the Autodesk FBX SDK did (KFbxXMatrix GetT / GetR / GetS), so the ufbx loader reproduces the original loader's rest poses and keys.
A mirrored matrix (negative determinant) can be split in two valid ways; the SDK made all three scales negative and kept a proper rotation, whereas ufbx flips one axis, and the two differ by a 180-degree turn on mirrored bones. Pure (column vectors, translation in column 3), unit tested in tests/cpp/test_fbx_decompose.cpp.
Definition in file FbxDecompose.h.