mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 12:35:13 +02:00
Remove Rig::restoreJointPosition and references to it.
This commit is contained in:
parent
1027025b5c
commit
576273efe3
6 changed files with 0 additions and 53 deletions
|
@ -1050,16 +1050,6 @@ void Rig::updateAnimations(float deltaTime, const glm::mat4& rootTransform, cons
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Rig::inverseKinematics(int endIndex, glm::vec3 targetPosition, const glm::quat& targetRotation, float priority,
|
|
||||||
const QVector<int>& freeLineage, glm::mat4 rootTransform) {
|
|
||||||
ASSERT(false);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool Rig::restoreJointPosition(int jointIndex, float fraction, float priority, const QVector<int>& freeLineage) {
|
|
||||||
ASSERT(false);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
float Rig::getLimbLength(int jointIndex, const QVector<int>& freeLineage,
|
float Rig::getLimbLength(int jointIndex, const QVector<int>& freeLineage,
|
||||||
const glm::vec3 scale, const QVector<FBXJoint>& fbxJoints) const {
|
const glm::vec3 scale, const QVector<FBXJoint>& fbxJoints) const {
|
||||||
ASSERT(false);
|
ASSERT(false);
|
||||||
|
|
|
@ -172,10 +172,6 @@ public:
|
||||||
// Regardless of who started the animations or how many, update the joints.
|
// Regardless of who started the animations or how many, update the joints.
|
||||||
void updateAnimations(float deltaTime, const glm::mat4& rootTransform, const glm::mat4& rigToWorldTransform);
|
void updateAnimations(float deltaTime, const glm::mat4& rootTransform, const glm::mat4& rigToWorldTransform);
|
||||||
|
|
||||||
// legacy
|
|
||||||
void inverseKinematics(int endIndex, glm::vec3 targetPosition, const glm::quat& targetRotation, float priority,
|
|
||||||
const QVector<int>& freeLineage, glm::mat4 rootTransform);
|
|
||||||
|
|
||||||
// legacy
|
// legacy
|
||||||
bool restoreJointPosition(int jointIndex, float fraction, float priority, const QVector<int>& freeLineage);
|
bool restoreJointPosition(int jointIndex, float fraction, float priority, const QVector<int>& freeLineage);
|
||||||
|
|
||||||
|
|
|
@ -237,10 +237,6 @@ bool SkeletonModel::getRightHandPosition(glm::vec3& position) const {
|
||||||
return getJointPositionInWorldFrame(getRightHandJointIndex(), position);
|
return getJointPositionInWorldFrame(getRightHandJointIndex(), position);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SkeletonModel::restoreLeftHandPosition(float fraction, float priority) {
|
|
||||||
return restoreJointPosition(getLeftHandJointIndex(), fraction, priority);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool SkeletonModel::getLeftShoulderPosition(glm::vec3& position) const {
|
bool SkeletonModel::getLeftShoulderPosition(glm::vec3& position) const {
|
||||||
return getJointPositionInWorldFrame(getLastFreeJointIndex(getLeftHandJointIndex()), position);
|
return getJointPositionInWorldFrame(getLastFreeJointIndex(getLeftHandJointIndex()), position);
|
||||||
}
|
}
|
||||||
|
@ -249,10 +245,6 @@ float SkeletonModel::getLeftArmLength() const {
|
||||||
return getLimbLength(getLeftHandJointIndex());
|
return getLimbLength(getLeftHandJointIndex());
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SkeletonModel::restoreRightHandPosition(float fraction, float priority) {
|
|
||||||
return restoreJointPosition(getRightHandJointIndex(), fraction, priority);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool SkeletonModel::getRightShoulderPosition(glm::vec3& position) const {
|
bool SkeletonModel::getRightShoulderPosition(glm::vec3& position) const {
|
||||||
return getJointPositionInWorldFrame(getLastFreeJointIndex(getRightHandJointIndex()), position);
|
return getJointPositionInWorldFrame(getLastFreeJointIndex(getRightHandJointIndex()), position);
|
||||||
}
|
}
|
||||||
|
|
|
@ -57,11 +57,6 @@ public:
|
||||||
/// \return true whether or not the position was found
|
/// \return true whether or not the position was found
|
||||||
bool getRightHandPosition(glm::vec3& position) const;
|
bool getRightHandPosition(glm::vec3& position) const;
|
||||||
|
|
||||||
/// Restores some fraction of the default position of the left hand.
|
|
||||||
/// \param fraction the fraction of the default position to restore
|
|
||||||
/// \return whether or not the left hand joint was found
|
|
||||||
bool restoreLeftHandPosition(float fraction = 1.0f, float priority = 1.0f);
|
|
||||||
|
|
||||||
/// Gets the position of the left shoulder.
|
/// Gets the position of the left shoulder.
|
||||||
/// \return whether or not the left shoulder joint was found
|
/// \return whether or not the left shoulder joint was found
|
||||||
bool getLeftShoulderPosition(glm::vec3& position) const;
|
bool getLeftShoulderPosition(glm::vec3& position) const;
|
||||||
|
@ -69,11 +64,6 @@ public:
|
||||||
/// Returns the extended length from the left hand to its last free ancestor.
|
/// Returns the extended length from the left hand to its last free ancestor.
|
||||||
float getLeftArmLength() const;
|
float getLeftArmLength() const;
|
||||||
|
|
||||||
/// Restores some fraction of the default position of the right hand.
|
|
||||||
/// \param fraction the fraction of the default position to restore
|
|
||||||
/// \return whether or not the right hand joint was found
|
|
||||||
bool restoreRightHandPosition(float fraction = 1.0f, float priority = 1.0f);
|
|
||||||
|
|
||||||
/// Gets the position of the right shoulder.
|
/// Gets the position of the right shoulder.
|
||||||
/// \return whether or not the right shoulder joint was found
|
/// \return whether or not the right shoulder joint was found
|
||||||
bool getRightShoulderPosition(glm::vec3& position) const;
|
bool getRightShoulderPosition(glm::vec3& position) const;
|
||||||
|
|
|
@ -1259,19 +1259,6 @@ void Model::updateClusterMatrices() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Model::inverseKinematics(int endIndex, glm::vec3 targetPosition, const glm::quat& targetRotation, float priority) {
|
|
||||||
const FBXGeometry& geometry = getFBXGeometry();
|
|
||||||
const QVector<int>& freeLineage = geometry.joints.at(endIndex).freeLineage;
|
|
||||||
glm::mat4 parentTransform = glm::scale(_scale) * glm::translate(_offset);
|
|
||||||
_rig.inverseKinematics(endIndex, targetPosition, targetRotation, priority, freeLineage, parentTransform);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool Model::restoreJointPosition(int jointIndex, float fraction, float priority) {
|
|
||||||
const FBXGeometry& geometry = getFBXGeometry();
|
|
||||||
const QVector<int>& freeLineage = geometry.joints.at(jointIndex).freeLineage;
|
|
||||||
return _rig.restoreJointPosition(jointIndex, fraction, priority, freeLineage);
|
|
||||||
}
|
|
||||||
|
|
||||||
float Model::getLimbLength(int jointIndex) const {
|
float Model::getLimbLength(int jointIndex) const {
|
||||||
const FBXGeometry& geometry = getFBXGeometry();
|
const FBXGeometry& geometry = getFBXGeometry();
|
||||||
const QVector<int>& freeLineage = geometry.joints.at(jointIndex).freeLineage;
|
const QVector<int>& freeLineage = geometry.joints.at(jointIndex).freeLineage;
|
||||||
|
|
|
@ -199,8 +199,6 @@ public:
|
||||||
/// Returns the index of the parent of the indexed joint, or -1 if not found.
|
/// Returns the index of the parent of the indexed joint, or -1 if not found.
|
||||||
int getParentJointIndex(int jointIndex) const;
|
int getParentJointIndex(int jointIndex) const;
|
||||||
|
|
||||||
void inverseKinematics(int jointIndex, glm::vec3 position, const glm::quat& rotation, float priority);
|
|
||||||
|
|
||||||
/// Returns the extents of the model in its bind pose.
|
/// Returns the extents of the model in its bind pose.
|
||||||
Extents getBindExtents() const;
|
Extents getBindExtents() const;
|
||||||
|
|
||||||
|
@ -368,12 +366,6 @@ protected:
|
||||||
void computeMeshPartLocalBounds();
|
void computeMeshPartLocalBounds();
|
||||||
virtual void updateRig(float deltaTime, glm::mat4 parentTransform);
|
virtual void updateRig(float deltaTime, glm::mat4 parentTransform);
|
||||||
|
|
||||||
/// Restores the indexed joint to its default position.
|
|
||||||
/// \param fraction the fraction of the default position to apply (i.e., 0.25f to slerp one fourth of the way to
|
|
||||||
/// the original position
|
|
||||||
/// \return true if the joint was found
|
|
||||||
bool restoreJointPosition(int jointIndex, float fraction = 1.0f, float priority = 0.0f);
|
|
||||||
|
|
||||||
/// Computes and returns the extended length of the limb terminating at the specified joint and starting at the joint's
|
/// Computes and returns the extended length of the limb terminating at the specified joint and starting at the joint's
|
||||||
/// first free ancestor.
|
/// first free ancestor.
|
||||||
float getLimbLength(int jointIndex) const;
|
float getLimbLength(int jointIndex) const;
|
||||||
|
|
Loading…
Reference in a new issue