- fbx: fix time scaling in my previous patch.

pull/14/head
Alexander Gessler 2012-08-20 19:23:54 +02:00
parent 99aab0d9a7
commit 3f2a796b9d
1 changed files with 5 additions and 4 deletions

View File

@ -61,6 +61,7 @@ namespace FBX {
#define MAGIC_NODE_TAG "_$AssimpFbx$"
#define CONVERT_FBX_TIME(time) static_cast<double>(time) / 46186158
// XXX vc9's debugger won't step into anonymous namespaces
//namespace {
@ -2331,7 +2332,7 @@ private:
}
// magic value to convert fbx times to milliseconds
valOut->mTime = static_cast<double>(time) / 46186158;
valOut->mTime = CONVERT_FBX_TIME(time);
minTime = std::min(minTime, valOut->mTime);
maxTime = std::max(maxTime, valOut->mTime);
@ -2385,7 +2386,7 @@ private:
}
else {
for (size_t i = 0; i < times.size(); ++i) {
out_quat[i].mTime = times[i];
out_quat[i].mTime = CONVERT_FBX_TIME(times[i]);
out_quat[i].mValue = def_rotation;
}
}
@ -2395,7 +2396,7 @@ private:
}
else {
for (size_t i = 0; i < times.size(); ++i) {
out_scale[i].mTime = times[i];
out_scale[i].mTime = CONVERT_FBX_TIME(times[i]);
out_scale[i].mValue = def_scale;
}
}
@ -2405,7 +2406,7 @@ private:
}
else {
for (size_t i = 0; i < times.size(); ++i) {
out_translation[i].mTime = times[i];
out_translation[i].mTime = CONVERT_FBX_TIME(times[i]);
out_translation[i].mValue = def_translate;
}
}