← Back to team overview

yade-dev team mailing list archive

Re: Use of AxisAngle : which file to include ?

 

Hi,

try something like that:

#include<Eigen/Core>
#include<Eigen/Geometry>
    Real angle;
    Eigen::Quaternion<Real> q;
    Eigen::AngleAxis<Real> aa(q);
    angle = aa.angle();



2010/7/12 Jerome Duriez <jerome.duriez@xxxxxxxxxxxxxxx>

> Hi,
>
> I want to get the angle corresponding to a given quaternion Q. Now with
> Eigen "Q.toAxisAngle(..,..)" is no more available, and I tried (after giving
> a look to /usr/include/eigen2/Eigen/src/Geometry/AngleAxis.h, and
> https://yade-dem.org/wiki/Wm3%E2%86%92Eigen) :
>
> Real angle;
> AxisAngle aa(Q);
> angle = aa.angle();
>
> But I get this compilation error : error: 'AxisAngle' was not declared in
> this scope
>
> So, which file - if this is the reason - do I have to include ? (with
> #include "/usr/include/eigen2/Eigen/src/Geometry/AngleAxis.h", it does not
> work)
>
> Thanks a lot,
>
> Jerome
>
> --
> Jérôme Duriez
> ATER Iut 1 Grenoble, département GMP - Laboratoire 3S-R
> 04.56.52.86.49 (ne pas laisser de messages sur le répondeur)
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~yade-dev<https://launchpad.net/%7Eyade-dev>
> Post to     : yade-dev@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~yade-dev<https://launchpad.net/%7Eyade-dev>
> More help   : https://help.launchpad.net/ListHelp
>

References