Re: [eigen] Creating a EulerAngle object

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]


On Mon, Feb 20, 2012 at 10:26 PM, Christoph Hertzberg
<chtz@xxxxxxxxxxxxxxxxxxxxxxxx> wrote:
>> 4. (Nice to have) Be able to use the EulerAngle in any rotation arithmetic
>> (e.g. result = quaterion1 * eulerAngle * affine3d);
>
>
> I guess this more or less can be solved by solving 2, i.e. just convert to a
> 3x3 matrix (or whatever) temporarily.
>
>> Looking the at the page "Extending Eigen"
>> (http://eigen.tuxfamily.org/dox-devel/TopicCustomizingEigen.html<http://eigen.tuxfamily.org/dox-devel/TopicCustomizingEigen.html>
>>  ), i'm not really sure that I want to inherit directly from Matrix and then
>> re-implement everything. I guess the good way is to inherit from
>> RotationBase much the same way as the Quaternion object. Am I wrong?
>
>
> I agree that inheriting from RotationBase is better. I think beneath the
> scalar type you should encode the axis-order using three template parameters
> (maybe defaulting to "the most common" convention).

Inheriting RotationBase is indeed the best approach for that. You can
take inspiration from the AngleAxis class.

Alos don't miss the eulerAngle(int,int,int) method in Eigen which
allows to convert a 3x3 rotation matrix to any Euler angle convention.
You might also have a look at the EulerAngle class we had during the
alpha versions of Eigen 2.0 :
https://bitbucket.org/eigen/eigen/src/42e749aa2451/disabled/EulerAngles.h
though it is rather out of date and limited to a single convention.


cheers,
gael


>
> Christoph
>
>
>
> --
> ----------------------------------------------
> Dipl.-Inf. Christoph Hertzberg
> Cartesium 0.051
> Universität Bremen
> Enrique-Schmidt-Straße 5
> 28359 Bremen
>
> Tel: (+49) 421-218-64252
> ----------------------------------------------
>
>



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/