Re: [eigen] Mapping array of scalars into quaternions

[ Thread Index | Date Index | More Archives ]

Sorry I don't have much time to follow this development, but it seems that
in the current patch QuaternionWrapper would be only to map a float* (or
double*) as a Quaternion, right ? while other uses of "Wrapper" are to to
wrap any expressions (including a Map<>) as something else (e.g. a

So instead of QuaternionWrapper, what about using a specialization of Map
for Quaternion:

template<typename _Scalar, int Alignment>
class Map<Quaternion<_Scalar>, Alignment> : public QuaternionBase<...>
 // current QuaternionWrapper's code goes here

User code would look like:

float data[4];
Map<Quaternionf,Aligned> q(data);

Maybe this look more natural ?

Mail converted by MHonArc 2.6.19+