// Get the matrix of the given pose static FbxAMatrix GetPoseMatrix(FbxPose pPose, int pNodeIndex) { FbxMatrix lMatrix = pPose.GetMatrix(pNodeIndex); FbxAMatrix lPoseMatrix = new FbxAMatrix(); //memcpy((double*)lPoseMatrix, (double*)lMatrix, sizeof(lMatrix.mData)); lPoseMatrix.SetRow(0, lMatrix.GetRow(0)); lPoseMatrix.SetRow(1, lMatrix.GetRow(1)); lPoseMatrix.SetRow(2, lMatrix.GetRow(2)); lPoseMatrix.SetRow(3, lMatrix.GetRow(3)); return(lPoseMatrix); }
protected void CheckExportBindPose(FbxScene origScene, FbxScene importScene) { FbxPose origPose = origScene.GetPose(0); FbxPose importPose = importScene.GetPose(0); Assert.IsNotNull(origPose); Assert.IsNotNull(importPose); Assert.AreEqual(origPose.IsBindPose(), importPose.IsBindPose()); Assert.AreEqual(origPose.GetCount(), importPose.GetCount()); for (int i = 0; i < origPose.GetCount(); i++) { Assert.AreEqual(origPose.GetNode(i).GetName(), importPose.GetNode(i).GetName()); Assert.AreEqual(origPose.GetMatrix(i), importPose.GetMatrix(i)); } }