Showing the changes to interface/src/avatar/SkeletonModel.cpp (1 of 3 files). Show all
Unified · Split
| @@ -148,7 +148,7 @@ void SkeletonModel::applyHandPositionInModelFrame(int jointIndex, const glm::vec · 147 unmodified lines | |||
| 148 | return; | 148 | return; |
| 149 | } | 149 | } |
| 150 | JointState& state = _jointStates[jointIndex]; | 150 | JointState& state = _jointStates[jointIndex]; |
| 151 | glm::quat handRotation = state.getRotationInModelFrame(); | 151 | glm::quat handRotation = state.getRotation(); |
| 152 | 152 | ||
| 153 | // align hand with forearm | 153 | // align hand with forearm |
| 154 | float sign = (jointIndex == geometry.rightHandJointIndex) ? 1.0f : -1.0f; | 154 | float sign = (jointIndex == geometry.rightHandJointIndex) ? 1.0f : -1.0f; |
| @@ -267,7 +267,7 @@ void SkeletonModel::renderJointConstraints(int jointIndex) { · 112 unmodified lines | |||
| 267 | 267 | ||
| 268 | glPushMatrix(); | 268 | glPushMatrix(); |
| 269 | glTranslatef(position.x, position.y, position.z); | 269 | glTranslatef(position.x, position.y, position.z); |
| 270 | glm::quat parentRotation = (joint.parentIndex == -1) ? _rotation : _rotation * _jointStates.at(joint.parentIndex).getRotationInModelFrame(); | 270 | glm::quat parentRotation = (joint.parentIndex == -1) ? _rotation : _rotation * _jointStates.at(joint.parentIndex).getRotation(); |
| 271 | glm::vec3 rotationAxis = glm::axis(parentRotation); | 271 | glm::vec3 rotationAxis = glm::axis(parentRotation); |
| 272 | glRotatef(glm::degrees(glm::angle(parentRotation)), rotationAxis.x, rotationAxis.y, rotationAxis.z); | 272 | glRotatef(glm::degrees(glm::angle(parentRotation)), rotationAxis.x, rotationAxis.y, rotationAxis.z); |
| 273 | float fanScale = directionSize * 0.75f; | 273 | float fanScale = directionSize * 0.75f; |
| @@ -300,7 +300,7 @@ void SkeletonModel::renderJointConstraints(int jointIndex) { · 26 unmodified lines | |||
| 300 | } | 300 | } |
| 301 | glPopMatrix(); | 301 | glPopMatrix(); |
| 302 | 302 | ||
| 303 | renderOrientationDirections(position, _rotation * jointState.getRotationInModelFrame(), directionSize); | 303 | renderOrientationDirections(position, _rotation * jointState.getRotation(), directionSize); |
| 304 | jointIndex = joint.parentIndex; | 304 | jointIndex = joint.parentIndex; |
| 305 | 305 | ||
| 306 | } while (jointIndex != -1 && geometry.joints.at(jointIndex).isFree); | 306 | } while (jointIndex != -1 && geometry.joints.at(jointIndex).isFree); |