mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-05 06:05:31 +02:00
implementing backup of cluster matrices
This commit is contained in:
parent
5bb2378cd9
commit
92befbc5bf
2 changed files with 9 additions and 0 deletions
|
@ -349,6 +349,7 @@ public:
|
|||
Extents meshExtents;
|
||||
|
||||
QVector<HFMAnimationFrame> animationFrames;
|
||||
std::vector<std::vector<glm::mat4>> clusterBindMatrixOriginalValues;
|
||||
|
||||
int getJointIndex(const QString& name) const { return jointIndices.value(name) - 1; }
|
||||
QStringList getJointNames() const;
|
||||
|
|
|
@ -2034,6 +2034,14 @@ HFMModel* FBXReader::extractHFMModel(const QVariantHash& mapping, const QString&
|
|||
//hfmModel.jointRotationOffsets.insert(13, glm::quat(0.5f, 0.5f, 0.5f, -0.5f));
|
||||
//hfmModel.jointRotationOffsets.insert(62, glm::quat(0.7071f, 0.0f, -0.7071f, 0.0f));
|
||||
|
||||
for (int i = 0; i < (int)hfmModel.meshes.size(); i++) {
|
||||
const HFMMesh& mesh = hfmModel.meshes.at(i);
|
||||
for (int j = 0; j < mesh.clusters.size(); j++) {
|
||||
const HFMCluster& cluster = mesh.clusters.at(j);
|
||||
hfmModel.clusterBindMatrixOriginalValues[i][cluster.jointIndex] = cluster.inverseBindMatrix;
|
||||
}
|
||||
}
|
||||
|
||||
return hfmModelPtr;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue