mirror of
https://github.com/overte-org/overte.git
synced 2025-04-21 08:04:01 +02:00
Define separately globalTransformForCluster and localTransformForCluster for clarity
This commit is contained in:
parent
6f5c9924c0
commit
ff908a36d6
1 changed files with 5 additions and 2 deletions
|
@ -1336,10 +1336,13 @@ HFMModel* FBXSerializer::extractHFMModel(const hifi::VariantHash& mapping, const
|
|||
// First, calculate the FBX-specific transform used for inverse bind transform calculations
|
||||
|
||||
glm::quat jointBindCombinedRotation = fbxModel.preRotation * fbxModel.rotation * fbxModel.postRotation;
|
||||
glm::mat4 globalTransformForCluster = glm::translate(fbxModel.translation) * fbxModel.preTransform * glm::mat4_cast(jointBindCombinedRotation) * fbxModel.postTransform;
|
||||
const glm::mat4 localTransformForCluster = glm::translate(fbxModel.translation) * fbxModel.preTransform * glm::mat4_cast(jointBindCombinedRotation) * fbxModel.postTransform;
|
||||
glm::mat4 globalTransformForCluster;
|
||||
if (fbxModel.parentIndex != -1 && fbxModel.parentIndex < (int)jointIndex && !needMixamoHack) {
|
||||
const glm::mat4& parentGlobalTransformForCluster = globalTransformForClusters[fbxModel.parentIndex];
|
||||
globalTransformForCluster = parentGlobalTransformForCluster * globalTransformForCluster;
|
||||
globalTransformForCluster = parentGlobalTransformForCluster * localTransformForCluster;
|
||||
} else {
|
||||
globalTransformForCluster = localTransformForCluster;
|
||||
}
|
||||
if (fbxModel.hasGeometricOffset) {
|
||||
glm::mat4 geometricOffset = createMatFromScaleQuatAndPos(fbxModel.geometricScaling, fbxModel.geometricRotation, fbxModel.geometricTranslation);
|
||||
|
|
Loading…
Reference in a new issue