From 8252bbed9b7af30a903d4fa4d000fcfc8cbb3a51 Mon Sep 17 00:00:00 2001 From: "Anthony J. Thibault" Date: Mon, 23 Nov 2015 13:50:14 -0800 Subject: [PATCH] AnimSkeleton: added pre rotation accessor methods --- libraries/animation/src/AnimSkeleton.cpp | 4 ++++ libraries/animation/src/AnimSkeleton.h | 3 +++ 2 files changed, 7 insertions(+) diff --git a/libraries/animation/src/AnimSkeleton.cpp b/libraries/animation/src/AnimSkeleton.cpp index 55e56ae503..ad358709c2 100644 --- a/libraries/animation/src/AnimSkeleton.cpp +++ b/libraries/animation/src/AnimSkeleton.cpp @@ -76,6 +76,10 @@ const AnimPose& AnimSkeleton::getAbsoluteDefaultPose(int jointIndex) const { return _absoluteDefaultPoses[jointIndex]; } +const glm::quat AnimSkeleton::getPreRotation(int jointIndex) const { + return _joints[jointIndex].preRotation; +} + int AnimSkeleton::getParentIndex(int jointIndex) const { return _joints[jointIndex].parentIndex; } diff --git a/libraries/animation/src/AnimSkeleton.h b/libraries/animation/src/AnimSkeleton.h index 0e0b07a8fd..5e0a80d077 100644 --- a/libraries/animation/src/AnimSkeleton.h +++ b/libraries/animation/src/AnimSkeleton.h @@ -44,6 +44,9 @@ public: const AnimPose& getAbsoluteDefaultPose(int jointIndex) const; const AnimPoseVec& getAbsoluteDefaultPoses() const { return _absoluteDefaultPoses; } + // get pre-rotation aka Maya's joint orientation. + const glm::quat getPreRotation(int jointIndex) const; + int getParentIndex(int jointIndex) const; AnimPose getAbsolutePose(int jointIndex, const AnimPoseVec& poses) const;