diff --git a/bone.cpp b/bone.cpp index 3275fa8..18068c5 100644 --- a/bone.cpp +++ b/bone.cpp @@ -32,7 +32,7 @@ namespace vb01{ Vector3 Bone::getModelSpacePos(){ Vector3 modelSpacePos = Vector3::VEC_ZERO; Bone *rootBone = skeleton->getRootBone(); - vector boneHierarchy = getAncestors(rootBone); + vector boneHierarchy = getAncestors(); while(!boneHierarchy.empty()){ int id = boneHierarchy.size() - 1; @@ -67,7 +67,7 @@ namespace vb01{ setOrientation(restRot); Quaternion parentSpacePoseRot = Quaternion::QUAT_W; - vector ancestors = getAncestors(this); + vector ancestors = getAncestors(); for(int i = 0; i < ancestors.size(); i++) parentSpacePoseRot = parentSpacePoseRot * ancestors[i]->getOrientation(); for(int i = ancestors.size() - 1; i > 0; i--) diff --git a/node.cpp b/node.cpp index 851343c..8779a97 100755 --- a/node.cpp +++ b/node.cpp @@ -198,7 +198,7 @@ namespace vb01{ } Vector3 Node::localToGlobalPosition(Vector3 localPos){ - vector ancestors = getAncestors(this); + vector ancestors = getAncestors(); Vector3 origin = Vector3::VEC_ZERO; while(!ancestors.empty()){ @@ -272,7 +272,7 @@ namespace vb01{ } Quaternion Node::localToGlobalOrientation(Quaternion localRot){ - vector ancestors = getAncestors(this); + vector ancestors = getAncestors(); Quaternion origin = adjustRot(ancestors, Quaternion::QUAT_W, true); @@ -280,7 +280,7 @@ namespace vb01{ } Quaternion Node::globalToLocalOrientation(Quaternion globalRot){ - vector ancestors = getAncestors(this); + vector ancestors = getAncestors(); Quaternion origin = adjustRot(ancestors, globalRot, false);