History

Tabs -> spaces.

Andrzej Kapolka committed 12 years ago

Commit 301234a1 parent 3eefb6a1 file · +4 −4Browse files

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

Unified · Split

interface/src/avatar/SkeletonModel.cpp+4−4
@@ -320,16 +320,16 @@ void SkeletonModel::setHandPosition(int jointIndex, const glm::vec3& position, c · 319 unmodified lines
320320 glm::vec3 handNormal = glm::cross(rotation * glm::vec3(0.0f, 1.0f, 0.0f), shoulderToWrist); // elbow rotating with wrist
321321 glm::vec3 relaxedNormal = glm::cross(glm::vec3(0.0f, 1.0f, 0.0f), shoulderToWrist); // elbow pointing straight down
322322 const float NORMAL_WEIGHT = 0.5f;
323− glm::vec3 finalNormal = glm::mix(relaxedNormal, handNormal, NORMAL_WEIGHT);
323+ glm::vec3 finalNormal = glm::mix(relaxedNormal, handNormal, NORMAL_WEIGHT);
324324
325325 bool rightHand = (jointIndex == geometry.rightHandJointIndex);
326326 if (rightHand ? (finalNormal.y > 0.0f) : (finalNormal.y < 0.0f)) {
327327 finalNormal.y = 0.0f; // dont allow elbows to point inward (y is vertical axis)
328328 }
329329
330− glm::vec3 tangent = glm::normalize(glm::cross(shoulderToWrist, finalNormal));
331−
332− // ik solution
330+ glm::vec3 tangent = glm::normalize(glm::cross(shoulderToWrist, finalNormal));
331+
332+ // ik solution
333333 glm::vec3 elbowPosition = shoulderPosition + glm::normalize(shoulderToWrist) * mid - tangent * height;
334334
335335 glm::vec3 forwardVector(rightHand ? -1.0f : 1.0f, 0.0f, 0.0f);

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