Adds a format scale multiplier for shape formats that use a default unit other than meters.

This commit is contained in:
OTHGMars 2020-03-22 02:25:12 -04:00
parent 340adae967
commit 76550a5859
6 changed files with 38 additions and 4 deletions

View file

@ -91,7 +91,7 @@ MatrixF AssimpAppNode::getTransform(F32 time)
else {
// no parent (ie. root level) => scale by global shape <unit>
mLastTransform.identity();
mLastTransform.scale(ColladaUtils::getOptions().unit);
mLastTransform.scale(ColladaUtils::getOptions().unit * ColladaUtils::getOptions().formatScaleFactor);
if (!isBounds())
convertMat(mLastTransform);
}
@ -330,4 +330,4 @@ aiNode* AssimpAppNode::findChildNodeByName(const char* nodeName, aiNode* rootNod
return retNode;
}
return nullptr;
}
}