mirror of
https://github.com/overte-org/overte.git
synced 2025-06-16 04:19:58 +02:00
remove JointState::setRotation()
instead use JointState::setRotationInModelFrame()
This commit is contained in:
parent
5d8e3d447a
commit
19f0f453a5
3 changed files with 2 additions and 12 deletions
|
@ -46,7 +46,7 @@ void SkeletonModel::simulate(float deltaTime, bool fullUpdate) {
|
||||||
int jointIndex = geometry.humanIKJointIndices.at(humanIKJointIndex);
|
int jointIndex = geometry.humanIKJointIndices.at(humanIKJointIndex);
|
||||||
if (jointIndex != -1) {
|
if (jointIndex != -1) {
|
||||||
JointState& state = _jointStates[jointIndex];
|
JointState& state = _jointStates[jointIndex];
|
||||||
state.setRotation(_rotation * prioVR->getJointRotations().at(i), PALM_PRIORITY);
|
state.setRotationInModelFrame(prioVR->getJointRotations().at(i), PALM_PRIORITY);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -2074,14 +2074,6 @@ void JointState::restoreRotation(float fraction, float priority) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void JointState::setRotation(const glm::quat& rotation, float priority) {
|
|
||||||
assert(_fbxJoint != NULL);
|
|
||||||
if (priority >= _animationPriority) {
|
|
||||||
_rotation = _rotation * glm::inverse(_combinedRotation) * rotation * glm::inverse(_fbxJoint->inverseBindRotation);
|
|
||||||
_animationPriority = priority;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void JointState::setRotationInModelFrame(const glm::quat& rotation, float priority) {
|
void JointState::setRotationInModelFrame(const glm::quat& rotation, float priority) {
|
||||||
assert(_fbxJoint != NULL);
|
assert(_fbxJoint != NULL);
|
||||||
if (priority >= _animationPriority) {
|
if (priority >= _animationPriority) {
|
||||||
|
|
|
@ -58,14 +58,12 @@ public:
|
||||||
|
|
||||||
void restoreRotation(float fraction, float priority);
|
void restoreRotation(float fraction, float priority);
|
||||||
|
|
||||||
/// \param rotation is from bind- to world-frame
|
/// \param rotation is from bind-frame to model-frame
|
||||||
/// computes parent relative _rotation and sets that
|
/// computes parent relative _rotation and sets that
|
||||||
/// \warning no combined transforms are updated!
|
/// \warning no combined transforms are updated!
|
||||||
void setRotation(const glm::quat& rotation, float priority);
|
|
||||||
void setRotationInModelFrame(const glm::quat& rotation, float priority);
|
void setRotationInModelFrame(const glm::quat& rotation, float priority);
|
||||||
|
|
||||||
const glm::mat4& getHybridTransform() const { return _transform; }
|
const glm::mat4& getHybridTransform() const { return _transform; }
|
||||||
//const glm::quat& getRotationInWorldFrame() const { return _combinedRotation; }
|
|
||||||
void clearTransformTranslation();
|
void clearTransformTranslation();
|
||||||
|
|
||||||
glm::quat _rotation; // rotation relative to parent
|
glm::quat _rotation; // rotation relative to parent
|
||||||
|
|
Loading…
Reference in a new issue