History

renames of JointState data members

Andrew Meadows committed 12 years ago

Commit d32e14c1 parent b1b7f6b4 files · +37 −37Browse files

Showing the changes to interface/src/avatar/SkeletonModel.cpp (1 of 4 files). Show all

Unified · Split

interface/src/avatar/SkeletonModel.cpp+2−2
@@ -200,7 +200,7 @@ void SkeletonModel::applyPalmDataInModelFrame(int jointIndex, PalmData& palm) { · 199 unmodified lines
200 JointState& parentState = _jointStates[parentJointIndex];200 JointState& parentState = _jointStates[parentJointIndex];
201 parentState.setRotationInModelFrame(palmRotation, PALM_PRIORITY);201 parentState.setRotationInModelFrame(palmRotation, PALM_PRIORITY);
202 // lock hand to forearm by slamming its rotation (in parent-frame) to identity202 // lock hand to forearm by slamming its rotation (in parent-frame) to identity
203 _jointStates[jointIndex]._rotation = glm::quat();203 _jointStates[jointIndex]._rotationInParentFrame = glm::quat();
204 } else {204 } else {
205 setJointPositionInModelFrame(jointIndex, palmPosition, palmRotation,205 setJointPositionInModelFrame(jointIndex, palmPosition, palmRotation,
206 true, -1, false, glm::vec3(0.0f, -1.0f, 0.0f), PALM_PRIORITY);206 true, -1, false, glm::vec3(0.0f, -1.0f, 0.0f), PALM_PRIORITY);
@@ -239,7 +239,7 @@ void SkeletonModel::maybeUpdateLeanRotation(const JointState& parentState, const · 32 unmodified lines
239 glm::mat3 axes = glm::mat3_cast(glm::quat());239 glm::mat3 axes = glm::mat3_cast(glm::quat());
240 glm::mat3 inverse = glm::mat3(glm::inverse(parentState.getTransformInModelFrame() * glm::translate(state.getDefaultTranslationInParentFrame()) *240 glm::mat3 inverse = glm::mat3(glm::inverse(parentState.getTransformInModelFrame() * glm::translate(state.getDefaultTranslationInParentFrame()) *
241 joint.preTransform * glm::mat4_cast(joint.preRotation * joint.rotation)));241 joint.preTransform * glm::mat4_cast(joint.preRotation * joint.rotation)));
242 state._rotation = glm::angleAxis(- RADIANS_PER_DEGREE * _owningAvatar->getHead()->getFinalLeanSideways(), 242 state._rotationInParentFrame = glm::angleAxis(- RADIANS_PER_DEGREE * _owningAvatar->getHead()->getFinalLeanSideways(),
243 glm::normalize(inverse * axes[2])) * glm::angleAxis(- RADIANS_PER_DEGREE * _owningAvatar->getHead()->getFinalLeanForward(), 243 glm::normalize(inverse * axes[2])) * glm::angleAxis(- RADIANS_PER_DEGREE * _owningAvatar->getHead()->getFinalLeanForward(),
244 glm::normalize(inverse * axes[0])) * joint.rotation;244 glm::normalize(inverse * axes[0])) * joint.rotation;
245}245}

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t