On Thu, Oct 29, 2009 at 11:37 AM, Mathieu Gautier
<mathieu.gautier@xxxxxx> wrote:
Hi,
I'm currently setting a prototype of our own math library with eigen2 and more precisely using the Geometry part of Eigen2. In my library, I have many rotation composition using quaternion, like :
q = q1.conjugate() * q2 which are implemented through function :
quat_mult_conj(q, q1, q2).
So we avoid any temporary elements due to inversion, multiplication and assignation. But I' rather use the first notation if possible, it could also remove many of our operations (mult_conj, conj_mult, etc..)
Actually in Eigen2, _expression_ templates are used with MatrixBase through the CWise* or productBase classes. Since Quaternion doesn't inherited from MatrixBase, it doesn't seem possible to reuse the CWise* mecanism. Do I have to provide a new mecanism based to the CWise* or productBase ones to use _expression_ template with the Quaternion classes?
If so, these classes will inherit from the new QuaternionBase, are there specifics traps to avoid or part of existing code that could be reused ?
--
Mathieu Gautier