coding style

This commit is contained in:
Seth Alves 2017-07-06 17:36:28 -07:00
parent 4505b8cedf
commit 15d379cc5a

View file

@ -408,16 +408,18 @@ bool Rig::getJointPositionInWorldFrame(int jointIndex, glm::vec3& position, glm:
if (isIndexValid(jointIndex)) {
position = (rotation * _internalPoseSet._absolutePoses[jointIndex].trans()) + translation;
return true;
} else {
return false;
}
return false;
}
QReadLocker readLock(&_externalPoseSetLock);
if (jointIndex >= 0 && jointIndex < (int)_externalPoseSet._absolutePoses.size()) {
position = (rotation * _externalPoseSet._absolutePoses[jointIndex].trans()) + translation;
return true;
} else {
return false;
}
return false;
}
bool Rig::getJointPosition(int jointIndex, glm::vec3& position) const {
@ -425,10 +427,12 @@ bool Rig::getJointPosition(int jointIndex, glm::vec3& position) const {
if (isIndexValid(jointIndex)) {
position = _internalPoseSet._absolutePoses[jointIndex].trans();
return true;
} else {
return false;
}
return false;
} else {
return getAbsoluteJointTranslationInRigFrame(jointIndex, position);
}
return getAbsoluteJointTranslationInRigFrame(jointIndex, position);
}
bool Rig::getJointRotationInWorldFrame(int jointIndex, glm::quat& result, const glm::quat& rotation) const {
@ -436,8 +440,9 @@ bool Rig::getJointRotationInWorldFrame(int jointIndex, glm::quat& result, const
if (isIndexValid(jointIndex)) {
result = rotation * _internalPoseSet._absolutePoses[jointIndex].rot();
return true;
} else {
return false;
}
return false;
}
QReadLocker readLock(&_externalPoseSetLock);
@ -454,8 +459,9 @@ bool Rig::getJointRotation(int jointIndex, glm::quat& rotation) const {
if (isIndexValid(jointIndex)) {
rotation = _internalPoseSet._relativePoses[jointIndex].rot();
return true;
} else {
return false;
}
return false;
}
QReadLocker readLock(&_externalPoseSetLock);