diff options
author | Benoit Bolsee <benoit.bolsee@online.be> | 2012-06-03 16:06:42 +0400 |
---|---|---|
committer | Benoit Bolsee <benoit.bolsee@online.be> | 2012-06-03 16:06:42 +0400 |
commit | e063ea222ca27894ce7c3dd2de80b2f9bd02a60e (patch) | |
tree | 963a55dc2f95b3fa9e186aabd6f378a3402cde08 /intern/itasc | |
parent | 9ec2139c815cec481d89d2c9f035df021604ee41 (diff) |
Fix bug [#31588]: iTaSC does not handle armature scaling correctly. iTaSC solver operates in world reference, therefore armature scale is used to build the ik scene. But the scaling was not taken out when applying the pose at the end of the simulation.
Diffstat (limited to 'intern/itasc')
-rw-r--r-- | intern/itasc/kdl/frames.hpp | 3 | ||||
-rw-r--r-- | intern/itasc/kdl/frames.inl | 8 |
2 files changed, 11 insertions, 0 deletions
diff --git a/intern/itasc/kdl/frames.hpp b/intern/itasc/kdl/frames.hpp index 2a1ed3296f9..28a59898e20 100644 --- a/intern/itasc/kdl/frames.hpp +++ b/intern/itasc/kdl/frames.hpp @@ -201,6 +201,9 @@ public: //! Adds a vector from the Vector object itself inline Vector& operator +=(const Vector& arg); + //! Multiply by a scalar + inline Vector& operator *=(double arg); + //! Scalar multiplication is defined inline friend Vector operator*(const Vector& lhs,double rhs); //! Scalar multiplication is defined diff --git a/intern/itasc/kdl/frames.inl b/intern/itasc/kdl/frames.inl index ff1307766bf..65c6148cd8e 100644 --- a/intern/itasc/kdl/frames.inl +++ b/intern/itasc/kdl/frames.inl @@ -143,6 +143,14 @@ Vector& Vector::operator -=(const Vector & arg) return *this; } +Vector& Vector::operator *=(double arg) +{ + data[0] *= arg; + data[1] *= arg; + data[2] *= arg; + return *this; +} + Vector Vector::Zero() { return Vector(0,0,0); |