History

move hand/arm stuff from Model to SkeletonModel

Andrew Meadows committed 12 years ago

Commit 6efa4171 parent afc76605 files · +87 −87Browse files

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

Unified · Split

interface/src/avatar/SkeletonModel.cpp+40−0
@@ -347,4 +347,44 @@ void SkeletonModel::setHandPosition(int jointIndex, const glm::vec3& position, c · 346 unmodified lines
347347
348348 setJointRotation(jointIndex, rotation, true, PALM_PRIORITY);
349349 }
350+
351+bool SkeletonModel::getLeftHandPosition(glm::vec3& position) const {
352+ return getJointPosition(getLeftHandJointIndex(), position);
353+}
354+
355+bool SkeletonModel::getLeftHandRotation(glm::quat& rotation) const {
356+ return getJointRotation(getLeftHandJointIndex(), rotation);
357+}
358+
359+bool SkeletonModel::getRightHandPosition(glm::vec3& position) const {
360+ return getJointPosition(getRightHandJointIndex(), position);
361+}
362+
363+bool SkeletonModel::getRightHandRotation(glm::quat& rotation) const {
364+ return getJointRotation(getRightHandJointIndex(), rotation);
365+}
366+
367+bool SkeletonModel::restoreLeftHandPosition(float percent, float priority) {
368+ return restoreJointPosition(getLeftHandJointIndex(), percent, priority);
369+}
370+
371+bool SkeletonModel::getLeftShoulderPosition(glm::vec3& position) const {
372+ return getJointPosition(getLastFreeJointIndex(getLeftHandJointIndex()), position);
373+}
374+
375+float SkeletonModel::getLeftArmLength() const {
376+ return getLimbLength(getLeftHandJointIndex());
377+}
378+
379+bool SkeletonModel::restoreRightHandPosition(float percent, float priority) {
380+ return restoreJointPosition(getRightHandJointIndex(), percent, priority);
381+}
382+
383+bool SkeletonModel::getRightShoulderPosition(glm::vec3& position) const {
384+ return getJointPosition(getLastFreeJointIndex(getRightHandJointIndex()), position);
385+}
386+
387+float SkeletonModel::getRightArmLength() const {
388+ return getLimbLength(getRightHandJointIndex());
389+}
350390

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