diff options
author | Ton Roosendaal <ton@blender.org> | 2005-08-27 16:45:29 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2005-08-27 16:45:29 +0400 |
commit | a7f2ebf06c857482a20f1e73f17f7b38a3013756 (patch) | |
tree | 40b8dc513759ab3549ac16609e52757cd2c3ba8e /intern/moto/include/MT_Transform.h | |
parent | 665a6b2d9521bb4fb9fc57ee0c94f6a580d55c91 (diff) |
Second commit for Brecht's IK work.
(Moto needs 'make install' before you can do IK lib btw)
Diffstat (limited to 'intern/moto/include/MT_Transform.h')
-rw-r--r-- | intern/moto/include/MT_Transform.h | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/intern/moto/include/MT_Transform.h b/intern/moto/include/MT_Transform.h index 5b95f81b9dd..ee5ae29dc41 100644 --- a/intern/moto/include/MT_Transform.h +++ b/intern/moto/include/MT_Transform.h @@ -75,6 +75,12 @@ public: setBasis(m); } + static MT_Transform Identity() + { + MT_Transform t; + t.setIdentity(); + return t; + } MT_Point3 operator()(const MT_Point3& p) const { @@ -82,11 +88,22 @@ public: MT_dot(m_basis[1], p) + m_origin[1], MT_dot(m_basis[2], p) + m_origin[2]); } + + MT_Vector3 operator()(const MT_Vector3& p) const { + return MT_Vector3(MT_dot(m_basis[0], p) + m_origin[0], + MT_dot(m_basis[1], p) + m_origin[1], + MT_dot(m_basis[2], p) + m_origin[2]); + } MT_Point3 operator*(const MT_Point3& p) const { return (*this)(p); } - + + MT_Vector3 operator*(const MT_Vector3& p) const { + return (*this)(p); + } + + MT_Matrix3x3& getBasis() { return m_basis; } const MT_Matrix3x3& getBasis() const { return m_basis; } MT_Point3& getOrigin() { return m_origin; } |