Fix build

This commit is contained in:
Brad Davis 2016-12-28 12:59:56 -08:00
parent 694c8b5690
commit 7b90d71205
2 changed files with 4 additions and 4 deletions

View file

@ -89,7 +89,7 @@ void ScriptableAvatar::update(float deltatime) {
int mapping = _bind->getGeometry().getJointIndex(name);
if (mapping != -1 && !_maskedJoints.contains(name)) {
// 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);;
}
}
@ -97,8 +97,8 @@ void ScriptableAvatar::update(float deltatime) {
for (int i = 0; i < nJoints; i++) {
JointData& data = _jointData[i];
AnimPose& pose = poses[i];
if (data.rotation != pose.rot) {
data.rotation = pose.rot;
if (data.rotation != pose.rot()) {
data.rotation = pose.rot();
data.rotationSet = true;
}
}

View file

@ -26,7 +26,7 @@ AnimPose::AnimPose(const glm::mat4& mat) : _dirty(false) {
_rot = glm::quat_cast(tmp);
float lengthSquared = glm::length2(_rot);
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);
}
_trans = extractTranslation(mat);