Skip to content
Snippets Groups Projects
Commit c4a27bc9 authored by Oliver Sander's avatar Oliver Sander Committed by sander
Browse files

add methods 'rebind' and 'operator<<=

[[Imported from SVN: r9424]]
parent d354f645
No related branches found
No related tags found
No related merge requests found
......@@ -198,6 +198,21 @@ public:
(*this)[3] = std::cos(angle/2);
}
/** \brief Rebind the Rotation to another coordinate type */
template<class U>
struct rebind
{
typedef Rotation<U,3> other;
};
/** \brief Assigment from RigidBodyMotion with different type -- used for automatic differentiation with ADOL-C */
template <class T2>
Rotation& operator <<= (const Rotation<T2,3>& other) {
for (int i=0; i<4; i++)
(*this)[i] <<= other[i];
return *this;
}
/** \brief Return the identity element */
static Rotation<T,3> identity() {
// Default constructor creates an identity
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment