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
347 347
348 setJointRotation(jointIndex, rotation, true, PALM_PRIORITY);348 setJointRotation(jointIndex, rotation, true, PALM_PRIORITY);
349}349}
350
351bool SkeletonModel::getLeftHandPosition(glm::vec3& position) const {
352 return getJointPosition(getLeftHandJointIndex(), position);
353}
354
355bool SkeletonModel::getLeftHandRotation(glm::quat& rotation) const {
356 return getJointRotation(getLeftHandJointIndex(), rotation);
357}
358
359bool SkeletonModel::getRightHandPosition(glm::vec3& position) const {
360 return getJointPosition(getRightHandJointIndex(), position);
361}
362
363bool SkeletonModel::getRightHandRotation(glm::quat& rotation) const {
364 return getJointRotation(getRightHandJointIndex(), rotation);
365}
366
367bool SkeletonModel::restoreLeftHandPosition(float percent, float priority) {
368 return restoreJointPosition(getLeftHandJointIndex(), percent, priority);
369}
370
371bool SkeletonModel::getLeftShoulderPosition(glm::vec3& position) const {
372 return getJointPosition(getLastFreeJointIndex(getLeftHandJointIndex()), position);
373}
374
375float SkeletonModel::getLeftArmLength() const {
376 return getLimbLength(getLeftHandJointIndex());
377}
378
379bool SkeletonModel::restoreRightHandPosition(float percent, float priority) {
380 return restoreJointPosition(getRightHandJointIndex(), percent, priority);
381}
382
383bool SkeletonModel::getRightShoulderPosition(glm::vec3& position) const {
384 return getJointPosition(getLastFreeJointIndex(getRightHandJointIndex()), position);
385}
386
387float SkeletonModel::getRightArmLength() const {
388 return getLimbLength(getRightHandJointIndex());
389}
350 390

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