mirror of
https://github.com/overte-org/overte.git
synced 2025-08-13 09:19:51 +02:00
Fix build
This commit is contained in:
parent
694c8b5690
commit
7b90d71205
2 changed files with 4 additions and 4 deletions
|
@ -89,7 +89,7 @@ void ScriptableAvatar::update(float deltatime) {
|
||||||
int mapping = _bind->getGeometry().getJointIndex(name);
|
int mapping = _bind->getGeometry().getJointIndex(name);
|
||||||
if (mapping != -1 && !_maskedJoints.contains(name)) {
|
if (mapping != -1 && !_maskedJoints.contains(name)) {
|
||||||
// Eventually, this should probably deal with post rotations and translations, too.
|
// Eventually, this should probably deal with post rotations and translations, too.
|
||||||
poses[mapping].rot = modelJoints[mapping].preRotation *
|
poses[mapping].rot() = modelJoints[mapping].preRotation *
|
||||||
safeMix(floorFrame.rotations.at(i), ceilFrame.rotations.at(i), frameFraction);;
|
safeMix(floorFrame.rotations.at(i), ceilFrame.rotations.at(i), frameFraction);;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -97,8 +97,8 @@ void ScriptableAvatar::update(float deltatime) {
|
||||||
for (int i = 0; i < nJoints; i++) {
|
for (int i = 0; i < nJoints; i++) {
|
||||||
JointData& data = _jointData[i];
|
JointData& data = _jointData[i];
|
||||||
AnimPose& pose = poses[i];
|
AnimPose& pose = poses[i];
|
||||||
if (data.rotation != pose.rot) {
|
if (data.rotation != pose.rot()) {
|
||||||
data.rotation = pose.rot;
|
data.rotation = pose.rot();
|
||||||
data.rotationSet = true;
|
data.rotationSet = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,7 +26,7 @@ AnimPose::AnimPose(const glm::mat4& mat) : _dirty(false) {
|
||||||
_rot = glm::quat_cast(tmp);
|
_rot = glm::quat_cast(tmp);
|
||||||
float lengthSquared = glm::length2(_rot);
|
float lengthSquared = glm::length2(_rot);
|
||||||
if (glm::abs(lengthSquared - 1.0f) > EPSILON) {
|
if (glm::abs(lengthSquared - 1.0f) > EPSILON) {
|
||||||
float oneOverLength = 1.0f / sqrt(lengthSquared);
|
float oneOverLength = 1.0f / sqrtf(lengthSquared);
|
||||||
_rot = glm::quat(_rot.w * oneOverLength, _rot.x * oneOverLength, _rot.y * oneOverLength, _rot.z * oneOverLength);
|
_rot = glm::quat(_rot.w * oneOverLength, _rot.x * oneOverLength, _rot.y * oneOverLength, _rot.z * oneOverLength);
|
||||||
}
|
}
|
||||||
_trans = extractTranslation(mat);
|
_trans = extractTranslation(mat);
|
||||||
|
|
Loading…
Reference in a new issue