diff --git a/interface/src/avatar/SkeletonModel.cpp b/interface/src/avatar/SkeletonModel.cpp index c2e4c47a3f..3792ed531b 100644 --- a/interface/src/avatar/SkeletonModel.cpp +++ b/interface/src/avatar/SkeletonModel.cpp @@ -263,7 +263,7 @@ void SkeletonModel::renderJointConstraints(int jointIndex) { do { const FBXJoint& joint = geometry.joints.at(jointIndex); const JointState& jointState = _jointStates.at(jointIndex); - glm::vec3 position = _rotation * jointState.getPositionInModelFrame() + _translation; + glm::vec3 position = _rotation * jointState.getPosition() + _translation; glPushMatrix(); glTranslatef(position.x, position.y, position.z); diff --git a/interface/src/renderer/Model.cpp b/interface/src/renderer/Model.cpp index 305ad6753e..65b618deba 100644 --- a/interface/src/renderer/Model.cpp +++ b/interface/src/renderer/Model.cpp @@ -718,7 +718,7 @@ bool Model::getJointPositionInWorldFrame(int jointIndex, glm::vec3& position) co if (jointIndex == -1 || jointIndex >= _jointStates.size()) { return false; } - position = _translation + _rotation * _jointStates[jointIndex].getPositionInModelFrame(); + position = _translation + _rotation * _jointStates[jointIndex].getPosition(); return true; } @@ -960,7 +960,7 @@ void Model::updateShapePositions() { // shape position and rotation need to be in world-frame glm::quat stateRotation = state.getRotation(); glm::vec3 shapeOffset = uniformScale * (stateRotation * joint.shapePosition); - glm::vec3 worldPosition = _translation + _rotation * (state.getPositionInModelFrame() + shapeOffset); + glm::vec3 worldPosition = _translation + _rotation * (state.getPosition() + shapeOffset); Shape* shape = _jointShapes[i]; shape->setPosition(worldPosition); shape->setRotation(_rotation * stateRotation * joint.shapeRotation); @@ -985,12 +985,12 @@ bool Model::findRayIntersection(const glm::vec3& origin, const glm::vec3& direct float radiusScale = extractUniformScale(_scale); for (int i = 0; i < _jointStates.size(); i++) { const FBXJoint& joint = geometry.joints[i]; - glm::vec3 end = _translation + _rotation * _jointStates[i].getPositionInModelFrame(); + glm::vec3 end = _translation + _rotation * _jointStates[i].getPosition(); float endRadius = joint.boneRadius * radiusScale; glm::vec3 start = end; float startRadius = joint.boneRadius * radiusScale; if (joint.parentIndex != -1) { - start = _translation + _rotation * _jointStates[joint.parentIndex].getPositionInModelFrame(); + start = _translation + _rotation * _jointStates[joint.parentIndex].getPosition(); startRadius = geometry.joints[joint.parentIndex].boneRadius * radiusScale; } // for now, use average of start and end radii diff --git a/interface/src/renderer/Model.h b/interface/src/renderer/Model.h index 23d40bb29e..1edebc00e0 100644 --- a/interface/src/renderer/Model.h +++ b/interface/src/renderer/Model.h @@ -44,7 +44,7 @@ public: const glm::mat4& getTransform() const { return _transform; } glm::quat getRotation() const { return _rotation; } - glm::vec3 getPositionInModelFrame() const { return extractTranslation(_transform); } + glm::vec3 getPosition() const { return extractTranslation(_transform); } /// \return rotation from bind to model frame glm::quat getRotationFromBindToModelFrame() const;