mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-09 09:18:45 +02:00
implement RenderableModelEntityItem::setAbsoluteJointRotationInObjectFrame and RenderableModelEntityItem::setAbsoluteJointTranslationInObjectFrame
This commit is contained in:
parent
e41fa94958
commit
689fdfb35f
1 changed files with 7 additions and 1 deletions
|
@ -1037,6 +1037,9 @@ bool RenderableModelEntityItem::setAbsoluteJointRotationInObjectFrame(int index,
|
||||||
}
|
}
|
||||||
|
|
||||||
int jointParentIndex = rig->getJointParentIndex(index);
|
int jointParentIndex = rig->getJointParentIndex(index);
|
||||||
|
if (jointParentIndex == -1) {
|
||||||
|
return setLocalJointRotation(index, rotation);
|
||||||
|
}
|
||||||
|
|
||||||
bool success;
|
bool success;
|
||||||
AnimPose jointParentPose;
|
AnimPose jointParentPose;
|
||||||
|
@ -1067,6 +1070,9 @@ bool RenderableModelEntityItem::setAbsoluteJointTranslationInObjectFrame(int ind
|
||||||
}
|
}
|
||||||
|
|
||||||
int jointParentIndex = rig->getJointParentIndex(index);
|
int jointParentIndex = rig->getJointParentIndex(index);
|
||||||
|
if (jointParentIndex == -1) {
|
||||||
|
return setLocalJointTranslation(index, translation);
|
||||||
|
}
|
||||||
|
|
||||||
bool success;
|
bool success;
|
||||||
AnimPose jointParentPose;
|
AnimPose jointParentPose;
|
||||||
|
@ -1084,7 +1090,7 @@ bool RenderableModelEntityItem::setAbsoluteJointTranslationInObjectFrame(int ind
|
||||||
jointAbsolutePose.trans = translation;
|
jointAbsolutePose.trans = translation;
|
||||||
|
|
||||||
AnimPose jointRelativePose = jointParentInversePose * jointAbsolutePose;
|
AnimPose jointRelativePose = jointParentInversePose * jointAbsolutePose;
|
||||||
return setLocalJointRotation(index, jointRelativePose.trans);
|
return setLocalJointTranslation(index, jointRelativePose.trans);
|
||||||
}
|
}
|
||||||
|
|
||||||
glm::quat RenderableModelEntityItem::getLocalJointRotation(int index) const {
|
glm::quat RenderableModelEntityItem::getLocalJointRotation(int index) const {
|
||||||
|
|
Loading…
Reference in a new issue