|
Hi, guys.
Maybe I’m doing something wrong or maybe there’s a bug.
I have my own matrix (which is column-major) and there’s also yours - KFbxMatrix.
The following code doesn’t work for translation (everything is OK except translation, it’s zero):
KFbxMatrix mat = pNode->GetGlobalFromCurrentTake(pTime)
Matrix34 myMat;
for (unsigned int row = 0; row < 3; ++row)
{
for (unsigned int col = 0; col < 4; ++col)
{
myMat(row, col) = mat.Get(row, col)
}
}
Then I found the workaround. The following did work:
KFbxMatrix mat = pNode->GetGlobalFromCurrentTake(pTime)
Matrix34 myMat;
for (unsigned int row = 0; row < 3; ++row)
{
for (unsigned int col = 0; col < 4; ++col)
{
myMat(row, col) = ((double*)mat)[row + col * 4];
}
}
Is something wrong with matrix? ...
Regards,
Alexander.
P.S. FBX SDK 2011.2.
|
|
|
|
Hi,JustPC,
The column-major in FBX means the last row of the matrix represents the translation part of the transformation.
So translation elements are mat.Get(3,0), mat.Get(3,1) and mat.Get(3,2).
Jiayang Xu
Maya Data Platform
Autodesk
|
|
|