From c689d826f4498208bfc94da411cf5e9bbfe389b6 Mon Sep 17 00:00:00 2001 From: Andrew Meadows Date: Thu, 5 Jun 2014 15:48:18 -0700 Subject: [PATCH] fix for broken windows build with PrioVR libs The Model API changed but this code path was not updated. --- interface/src/devices/PrioVR.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/interface/src/devices/PrioVR.cpp b/interface/src/devices/PrioVR.cpp index 65cdb962e1..e96f4f04d5 100644 --- a/interface/src/devices/PrioVR.cpp +++ b/interface/src/devices/PrioVR.cpp @@ -76,20 +76,21 @@ static void setPalm(float deltaTime, int index) { } } + // NOTE: this math is done in the worl-frame with unecessary complexity. + // TODO: transfom this to stay in the model-frame. glm::vec3 position; glm::quat rotation; - SkeletonModel* skeletonModel = &Application::getInstance()->getAvatar()->getSkeletonModel(); int jointIndex; glm::quat inverseRotation = glm::inverse(Application::getInstance()->getAvatar()->getOrientation()); if (index == LEFT_HAND_INDEX) { jointIndex = skeletonModel->getLeftHandJointIndex(); - skeletonModel->getJointRotation(jointIndex, rotation, true); + skeletonModel->getJointRotationInWorldFrame(jointIndex, rotation); rotation = inverseRotation * rotation * glm::quat(glm::vec3(0.0f, PI_OVER_TWO, 0.0f)); } else { jointIndex = skeletonModel->getRightHandJointIndex(); - skeletonModel->getJointRotation(jointIndex, rotation, true); + skeletonModel->getJointRotationInWorldFrame(jointIndex, rotation); rotation = inverseRotation * rotation * glm::quat(glm::vec3(0.0f, -PI_OVER_TWO, 0.0f)); } skeletonModel->getJointPositionInWorldFrame(jointIndex, position);