summaryrefslogtreecommitdiffstats
path: root/o3d/core
diff options
context:
space:
mode:
authorgman@google.com <gman@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-29 00:58:57 +0000
committergman@google.com <gman@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-29 00:58:57 +0000
commit65ec66d36addd7cfcfbd7f691f11ed32a5934a93 (patch)
treea82b97accdc60205fb5177977323006f97db0dc3 /o3d/core
parent498375b461303bbc7d0805c557a3de3302e0586c (diff)
downloadchromium_src-65ec66d36addd7cfcfbd7f691f11ed32a5934a93.zip
chromium_src-65ec66d36addd7cfcfbd7f691f11ed32a5934a93.tar.gz
chromium_src-65ec66d36addd7cfcfbd7f691f11ed32a5934a93.tar.bz2
Quick fix for skinning translation bug.
We weren't binding the transform of the skin to the base so the transform was getting applied twice and also the math was wrong in skinning. This is the shortest change to make this work but it is arguably not the *correct* change. The correct change would be to make the import code create Skin separate from ParamArray and SkinEval so that you can use the same Skin data multiple times in the same scene. I don't know enough about collada to know if that's possible to setup in collada but the way the code is structured currently it seems to assume it is even though the code does support this correctly. That would take some work to fix and require samples and it seems unlikely people will run into that issue so this smaller fix seems good enough for now. Review URL: http://codereview.chromium.org/235046 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27447 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'o3d/core')
-rw-r--r--o3d/core/cross/skin.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/o3d/core/cross/skin.cc b/o3d/core/cross/skin.cc
index c7fa8ff..3c438c6 100644
--- a/o3d/core/cross/skin.cc
+++ b/o3d/core/cross/skin.cc
@@ -482,7 +482,7 @@ void SkinEval::UpdateOutputs() {
<< " is not a ParamMatrix4";
return;
}
- bones_[ii] = param->value() * inverse_base * inverse_bind_pose_array[ii];
+ bones_[ii] = inverse_base * param->value() * inverse_bind_pose_array[ii];
}
DoSkinning(the_skin);