remove JointState::setRotation()

instead use JointState::setRotationInModelFrame()
This commit is contained in:
Andrew Meadows 2014-06-04 11:52:07 -07:00
parent 5d8e3d447a
commit 19f0f453a5
3 changed files with 2 additions and 12 deletions

View file

@ -46,7 +46,7 @@ void SkeletonModel::simulate(float deltaTime, bool fullUpdate) {
int jointIndex = geometry.humanIKJointIndices.at(humanIKJointIndex);
if (jointIndex != -1) {
JointState& state = _jointStates[jointIndex];
state.setRotation(_rotation * prioVR->getJointRotations().at(i), PALM_PRIORITY);
state.setRotationInModelFrame(prioVR->getJointRotations().at(i), PALM_PRIORITY);
}
}
return;

View file

@ -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) {
assert(_fbxJoint != NULL);
if (priority >= _animationPriority) {

View file

@ -58,14 +58,12 @@ public:
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
/// \warning no combined transforms are updated!
void setRotation(const glm::quat& rotation, float priority);
void setRotationInModelFrame(const glm::quat& rotation, float priority);
const glm::mat4& getHybridTransform() const { return _transform; }
//const glm::quat& getRotationInWorldFrame() const { return _combinedRotation; }
void clearTransformTranslation();
glm::quat _rotation; // rotation relative to parent