Re: [eigen] Mapping array of scalars into quaternions |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] Mapping array of scalars into quaternions
- From: Benoit Jacob <jacob.benoit.1@xxxxxxxxx>
- Date: Thu, 22 Oct 2009 13:13:20 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=j2tNhehKGPqdOUBzp76dSTSx5o8NjPrEn/4rllc1lVQ=; b=EKLqF6Q1kSMbAcZ3jOOFw+evxjAAj4gse5pZl3h9/Om7daWHJkUwgGtdZrPOvZhJdh n9iuuYUFlF2+hkxdyDALAvHf1nfL3fo0w36tSVEAshHv8oTYEfRaYagcXOn+Xe0oNV9n xbhShwH4b/9zWHeRW1HfVtcZyNvWO3J/aNRdY=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=QpdSHRnN6ooC/iKA89UXlDRuTqCNXVhqjjhneXZnFyF7pg/qboUcqbvXXk+tP4ZWBU FuIUfWSZDQ4bPViHD9Wsv4tw7T/K3gq42SJammS7KyAtnNsoWUOflffhOePbwVqetqT9 LnxdRiZNeXziqzw0bGLMrbDiSGNpETMPKplgs=
2009/10/22 Mathieu Gautier <mathieu.gautier@xxxxxx>:
>> constructors and have different ei_traits. Now looking at the case of
>> quaternions, there too we need different constructors: the
>> QuaternionWrapper needs a ctor taking a pointer and doesn't want the
>> ctor taking 4 numbers, for example.
>
> With my patch, the pointer or the 4 scalars are given to the constructors of
> Matrix or Map<Matrix>. So, using the wrong constructor
> (Quaternion<,Map<Matrix>> with 4 scalars) will fail at build time. But it
> may not be explicit enough.
>
> The only specific function that I see would be a Remap(const Scalar*)
> function for the QuaternionWrapper.
>
> If the RotationBase <- QuaternionBase <- (QuaternionWrapper, Quaternion)
> inheritance layout is prefered, I could make a first version for
> QuaternionBase, Quaternion and QuaternionWrapper based on DiagonalMatrix,
> since I need it.
That would be great -- i could take care of doing Quaternion then,
that would be a piece of cake once you've done the rest.
In your patch, just let the Quaternion class untouched.
Benoit