Added getJointCombinedRotation to Models

This commit is contained in:
Atlante45 2014-05-28 15:57:38 -07:00
parent 16a370303f
commit 8cd101ac57
2 changed files with 11 additions and 2 deletions

View file

@ -646,6 +646,14 @@ bool Model::getJointRotation(int jointIndex, glm::quat& rotation, bool fromBind)
return true;
}
bool Model::getJointCombinedRotation(int jointIndex, glm::quat& rotation) const {
if (jointIndex == -1 || _jointStates.isEmpty()) {
return false;
}
rotation = _jointStates[jointIndex].combinedRotation;
return true;
}
QStringList Model::getJointNames() const {
if (QThread::currentThread() != thread()) {
QStringList result;

View file

@ -123,6 +123,7 @@ public:
bool getJointPosition(int jointIndex, glm::vec3& position) const;
bool getJointRotation(int jointIndex, glm::quat& rotation, bool fromBind = false) const;
bool getJointCombinedRotation(int jointIndex, glm::quat& rotation) const;
QStringList getJointNames() const;