Showing the changes to interface/src/avatar/SkeletonModel.cpp (1 of 3 files). Show all
Unified · Split
| @@ -147,7 +147,7 @@ void SkeletonModel::applyHandPosition(int jointIndex, const glm::vec3& position) · 146 unmodified lines | ||
| 147 | 147 | return; |
| 148 | 148 | } |
| 149 | 149 | JointState& state = _jointStates[jointIndex]; |
| 150 | − glm::quat handRotation = state.getRotationFromBindToModelFrame(); | |
| 150 | + glm::quat handRotation = state.getJointRotation(); | |
| 151 | 151 | |
| 152 | 152 | // align hand with forearm |
| 153 | 153 | float sign = (jointIndex == geometry.rightHandJointIndex) ? 1.0f : -1.0f; |
| @@ -170,10 +170,10 @@ void SkeletonModel::applyPalmData(int jointIndex, PalmData& palm) { · 16 unmodified lines | ||
| 170 | 170 | if (!Menu::getInstance()->isOptionChecked(MenuOption::AlternateIK) && |
| 171 | 171 | Menu::getInstance()->isOptionChecked(MenuOption::AlignForearmsWithWrists)) { |
| 172 | 172 | JointState parentState = _jointStates[parentJointIndex]; |
| 173 | − palmRotation = parentState.getRotationFromBindToModelFrame(); | |
| 173 | + palmRotation = parentState.getJointRotation(); | |
| 174 | 174 | } else { |
| 175 | 175 | JointState state = _jointStates[jointIndex]; |
| 176 | − palmRotation = state.getRotationFromBindToModelFrame(); | |
| 176 | + palmRotation = state.getJointRotation(); | |
| 177 | 177 | } |
| 178 | 178 | palmRotation = rotationBetween(palmRotation * geometry.palmDirection, palm.getNormal()) * palmRotation; |
| 179 | 179 | |
| @@ -414,7 +414,7 @@ bool SkeletonModel::getNeckParentRotation(glm::quat& neckParentRotation) const { · 234 unmodified lines | ||
| 414 | 414 | if (geometry.neckJointIndex == -1) { |
| 415 | 415 | return false; |
| 416 | 416 | } |
| 417 | − return getJointRotationFromBindToWorldFrame(geometry.joints.at(geometry.neckJointIndex).parentIndex, neckParentRotation); | |
| 417 | + return getJointRotationInWorldFrame(geometry.joints.at(geometry.neckJointIndex).parentIndex, neckParentRotation); | |
| 418 | 418 | } |
| 419 | 419 | |
| 420 | 420 | bool SkeletonModel::getEyePositions(glm::vec3& firstEyePosition, glm::vec3& secondEyePosition) const { |
| @@ -433,7 +433,7 @@ bool SkeletonModel::getEyePositions(glm::vec3& firstEyePosition, glm::vec3& seco · 12 unmodified lines | ||
| 433 | 433 | const float EYE_PROPORTION = 0.6f; |
| 434 | 434 | glm::vec3 baseEyePosition = glm::mix(neckPosition, headPosition, EYE_PROPORTION); |
| 435 | 435 | glm::quat headRotation; |
| 436 | − getJointRotationFromBindToWorldFrame(geometry.headJointIndex, headRotation); | |
| 436 | + getJointRotationInWorldFrame(geometry.headJointIndex, headRotation); | |
| 437 | 437 | const float EYES_FORWARD = 0.25f; |
| 438 | 438 | const float EYE_SEPARATION = 0.1f; |
| 439 | 439 | float headHeight = glm::distance(neckPosition, headPosition); |