code cleanup

This commit is contained in:
devZoGok
2021-10-19 19:06:41 +03:00
parent 2e0cad7fd1
commit 599bde975a
21 changed files with 43 additions and 84 deletions
+6 -3
View File
@@ -17,6 +17,11 @@ namespace vb01{
}
void Skeleton::update(){
updateIk();
controller->update();
}
void Skeleton::updateIk(){
for(Bone *b : bones){
if(b->getIkTarget()){
const int chainLength = b->getIkChainLength();
@@ -29,11 +34,9 @@ namespace vb01{
delete[] boneChain;
}
}
for(Bone *b : bones){
for(Bone *b : bones)
if(b->getIkTarget())
solveIk(b);
}
controller->update();
}
void Skeleton::solveIk(Bone *ikBone){