From 15d379cc5ab86be34b6190d91dd7528188ab6194 Mon Sep 17 00:00:00 2001 From: Seth Alves Date: Thu, 6 Jul 2017 17:36:28 -0700 Subject: [PATCH] coding style --- libraries/animation/src/Rig.cpp | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/libraries/animation/src/Rig.cpp b/libraries/animation/src/Rig.cpp index cd5d8c6231..6ebb68773f 100644 --- a/libraries/animation/src/Rig.cpp +++ b/libraries/animation/src/Rig.cpp @@ -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);