X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Fpose.cpp;h=99fa6bb3dfe812265a8e2372ddd9c1daad5f887a;hp=4d58939775b592ffa37366ce7aa75996116795e8;hb=f141ae14619bfbd51a7e6871c55edbdd17ac3417;hpb=164d77011ab4ebe76c9bf2b7ed8d8dd8ebc20e61 diff --git a/source/pose.cpp b/source/pose.cpp index 4d589397..99fa6bb3 100644 --- a/source/pose.cpp +++ b/source/pose.cpp @@ -37,7 +37,7 @@ void Pose::rotate_link(unsigned i, float angle, const Vector3 &axis) // Keep the base point stationary Vector3 base = arm_link.get_base(); Vector3 new_base = links[i].local_matrix*base; - links[i].local_matrix = GL::Matrix::translation(base.x-new_base.x, base.y-new_base.y, base.z-new_base.z)*links[i].local_matrix; + links[i].local_matrix = Matrix::translation(base-new_base)*links[i].local_matrix; if(const Armature::Link *parent = arm_link.get_parent()) links[i].matrix = links[parent->get_index()].matrix*links[i].local_matrix; @@ -68,7 +68,7 @@ void Pose::Loader::armature(const string &n) void Pose::Loader::link(const string &n) { if(!obj.armature) - error("Armature must be specified first"); + throw logic_error("Armature must be specified first"); LinkLoader ldr(obj, obj.armature->get_link(n).get_index()); load_sub_with(ldr); }