add modeltree:get_matrix, :set_matrix

This commit is contained in:
MihailRis
2024-07-02 22:13:16 +03:00
parent 8a10ed24da
commit 42ea88501d
7 changed files with 53 additions and 18 deletions
+3 -2
View File
@@ -42,10 +42,11 @@ size_t RigConfig::update(
glm::mat4 matrix) const
{
rig.calculated.matrices[index] = matrix * rig.pose.matrices[index];
size_t count = 1;
for (auto& subnode : node->getSubnodes()) {
index = update(index+1, rig, subnode.get(), rig.calculated.matrices[index]);
count += update(index+count, rig, subnode.get(), rig.calculated.matrices[index]);
}
return index;
return count;
}
void RigConfig::update(Rig& rig, glm::mat4 matrix) const {