diff --git a/libraries/animation/src/Rig.cpp b/libraries/animation/src/Rig.cpp index 3c16ad71b1..1c9d9a3447 100644 --- a/libraries/animation/src/Rig.cpp +++ b/libraries/animation/src/Rig.cpp @@ -179,7 +179,7 @@ void Rig::restoreRoleAnimation(const QString& role) { } else { qCWarning(animation) << "Rig::restoreRoleAnimation could not find role " << role; } - + auto statesIter = _roleAnimStates.find(role); if (statesIter != _roleAnimStates.end()) { _roleAnimStates.erase(statesIter); @@ -1050,42 +1050,6 @@ void Rig::updateAnimations(float deltaTime, const glm::mat4& rootTransform, cons } } -float Rig::getLimbLength(int jointIndex, const QVector& freeLineage, - const glm::vec3 scale, const QVector& fbxJoints) const { - ASSERT(false); - return 1.0f; -} - -glm::quat Rig::setJointRotationInBindFrame(int jointIndex, const glm::quat& rotation, float priority) { - ASSERT(false); - return glm::quat(); -} - -glm::vec3 Rig::getJointDefaultTranslationInConstrainedFrame(int jointIndex) { - ASSERT(false); - return glm::vec3(); -} - -glm::quat Rig::setJointRotationInConstrainedFrame(int jointIndex, glm::quat targetRotation, float priority, float mix) { - ASSERT(false); - return glm::quat(); -} - -bool Rig::getJointRotationInConstrainedFrame(int jointIndex, glm::quat& quatOut) const { - ASSERT(false); - return false; -} - -void Rig::clearJointStatePriorities() { - ASSERT(false); -} - -glm::quat Rig::getJointDefaultRotationInParentFrame(int jointIndex) { - ASSERT(false); - return glm::quat(); -} - - void Rig::updateFromEyeParameters(const EyeParameters& params) { updateEyeJoint(params.leftEyeJointIndex, params.modelTranslation, params.modelRotation, params.eyeLookAt, params.eyeSaccade); updateEyeJoint(params.rightEyeJointIndex, params.modelTranslation, params.modelRotation, params.eyeLookAt, params.eyeSaccade); diff --git a/libraries/animation/src/Rig.h b/libraries/animation/src/Rig.h index 0877e7326d..87277af754 100644 --- a/libraries/animation/src/Rig.h +++ b/libraries/animation/src/Rig.h @@ -172,32 +172,6 @@ public: // Regardless of who started the animations or how many, update the joints. void updateAnimations(float deltaTime, const glm::mat4& rootTransform, const glm::mat4& rigToWorldTransform); - // legacy - bool restoreJointPosition(int jointIndex, float fraction, float priority, const QVector& freeLineage); - - // legacy - float getLimbLength(int jointIndex, const QVector& freeLineage, - const glm::vec3 scale, const QVector& fbxJoints) const; - - // legacy - glm::quat setJointRotationInBindFrame(int jointIndex, const glm::quat& rotation, float priority); - - // legacy - glm::vec3 getJointDefaultTranslationInConstrainedFrame(int jointIndex); - - // legacy - glm::quat setJointRotationInConstrainedFrame(int jointIndex, glm::quat targetRotation, - float priority, float mix = 1.0f); - - // legacy - bool getJointRotationInConstrainedFrame(int jointIndex, glm::quat& rotOut) const; - - // legacy - glm::quat getJointDefaultRotationInParentFrame(int jointIndex); - - // legacy - void clearJointStatePriorities(); - void updateFromControllerParameters(const ControllerParameters& params, float dt); void updateFromEyeParameters(const EyeParameters& params); @@ -341,7 +315,7 @@ protected: float firstFrame; float lastFrame; }; - + struct RoleAnimState { RoleAnimState() {} RoleAnimState(const QString& roleId, const QString& urlIn, float fpsIn, bool loopIn, float firstFrameIn, float lastFrameIn) : diff --git a/libraries/avatars-renderer/src/avatars-renderer/SkeletonModel.cpp b/libraries/avatars-renderer/src/avatars-renderer/SkeletonModel.cpp index 557fbb8670..1112ccde60 100644 --- a/libraries/avatars-renderer/src/avatars-renderer/SkeletonModel.cpp +++ b/libraries/avatars-renderer/src/avatars-renderer/SkeletonModel.cpp @@ -241,18 +241,10 @@ bool SkeletonModel::getLeftShoulderPosition(glm::vec3& position) const { return getJointPositionInWorldFrame(getLastFreeJointIndex(getLeftHandJointIndex()), position); } -float SkeletonModel::getLeftArmLength() const { - return getLimbLength(getLeftHandJointIndex()); -} - bool SkeletonModel::getRightShoulderPosition(glm::vec3& position) const { return getJointPositionInWorldFrame(getLastFreeJointIndex(getRightHandJointIndex()), position); } -float SkeletonModel::getRightArmLength() const { - return getLimbLength(getRightHandJointIndex()); -} - bool SkeletonModel::getHeadPosition(glm::vec3& headPosition) const { return isActive() && getJointPositionInWorldFrame(getFBXGeometry().headJointIndex, headPosition); } diff --git a/libraries/avatars-renderer/src/avatars-renderer/SkeletonModel.h b/libraries/avatars-renderer/src/avatars-renderer/SkeletonModel.h index 0407a5b580..d82fce7412 100644 --- a/libraries/avatars-renderer/src/avatars-renderer/SkeletonModel.h +++ b/libraries/avatars-renderer/src/avatars-renderer/SkeletonModel.h @@ -68,9 +68,6 @@ public: /// \return whether or not the right shoulder joint was found bool getRightShoulderPosition(glm::vec3& position) const; - /// Returns the extended length from the right hand to its first free ancestor. - float getRightArmLength() const; - /// Returns the position of the head joint. /// \return whether or not the head was found bool getHeadPosition(glm::vec3& headPosition) const; diff --git a/libraries/render-utils/src/Model.cpp b/libraries/render-utils/src/Model.cpp index f04c7e4cc0..c042c2fe29 100644 --- a/libraries/render-utils/src/Model.cpp +++ b/libraries/render-utils/src/Model.cpp @@ -1259,12 +1259,6 @@ void Model::updateClusterMatrices() { } } -float Model::getLimbLength(int jointIndex) const { - const FBXGeometry& geometry = getFBXGeometry(); - const QVector& freeLineage = geometry.joints.at(jointIndex).freeLineage; - return _rig.getLimbLength(jointIndex, freeLineage, _scale, geometry.joints); -} - bool Model::maybeStartBlender() { if (isLoaded()) { const FBXGeometry& fbxGeometry = getFBXGeometry(); diff --git a/libraries/render-utils/src/Model.h b/libraries/render-utils/src/Model.h index a7b46d2991..dcf1dda570 100644 --- a/libraries/render-utils/src/Model.h +++ b/libraries/render-utils/src/Model.h @@ -366,10 +366,6 @@ protected: void computeMeshPartLocalBounds(); virtual void updateRig(float deltaTime, glm::mat4 parentTransform); - /// Computes and returns the extended length of the limb terminating at the specified joint and starting at the joint's - /// first free ancestor. - float getLimbLength(int jointIndex) const; - /// Allow sub classes to force invalidating the bboxes void invalidCalculatedMeshBoxes() { _triangleSetsValid = false;