diff --git a/src/osgPlugins/fbx/fbxRAnimation.cpp b/src/osgPlugins/fbx/fbxRAnimation.cpp index 1086a0348..d7a46686c 100644 --- a/src/osgPlugins/fbx/fbxRAnimation.cpp +++ b/src/osgPlugins/fbx/fbxRAnimation.cpp @@ -27,8 +27,8 @@ void readKeys(KFCurve* curveX, KFCurve* curveY, KFCurve* curveZ, { KFCurve* curves[3] = {curveX, curveY, curveZ}; - typedef std::set TimeSet; - typedef std::map TimeFloatMap; + typedef std::set TimeSet; + typedef std::map TimeFloatMap; TimeSet times; TimeFloatMap curveTimeMap[3]; @@ -40,14 +40,14 @@ void readKeys(KFCurve* curveX, KFCurve* curveY, KFCurve* curveZ, if (!nKeys) { - times.insert(0.0f); - curveTimeMap[nCurve][0.0f] = static_cast(pCurve->GetValue()) * scalar; + times.insert(0.0); + curveTimeMap[nCurve][0.0] = static_cast(pCurve->GetValue()) * scalar; } for (int i = 0; i < nKeys; ++i) { KFCurveKey key = pCurve->KeyGet(i); - float fTime = static_cast(key.GetTime().GetSecondDouble()); + double fTime = key.GetTime().GetSecondDouble(); times.insert(fTime); curveTimeMap[nCurve][fTime] = static_cast(key.GetValue()) * scalar; } @@ -55,7 +55,7 @@ void readKeys(KFCurve* curveX, KFCurve* curveY, KFCurve* curveZ, for (TimeSet::iterator it = times.begin(); it != times.end(); ++it) { - float fTime = *it; + double fTime = *it; osg::Vec3 val; for (int i = 0; i < 3; ++i) { diff --git a/src/osgPlugins/fbx/fbxRMesh.cpp b/src/osgPlugins/fbx/fbxRMesh.cpp index 17c6cb3f1..0cc5cb3c4 100644 --- a/src/osgPlugins/fbx/fbxRMesh.cpp +++ b/src/osgPlugins/fbx/fbxRMesh.cpp @@ -263,7 +263,7 @@ void readAnimation(KFbxNode* pNode, const std::string& targetName, for (int k = 0; k < nKeys; ++k) { KFCurveKey key = pCurve->KeyGet(k); - float fTime = static_cast(key.GetTime().GetSecondDouble()); + double fTime = key.GetTime().GetSecondDouble(); float fValue = static_cast(key.GetValue() * 0.01); keyFrameCntr.push_back(osgAnimation::FloatKeyframe(fTime,fValue)); }