Re: [eigen] AngleAxis toRotationMatrix

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


Digging through the header shows that the axis vector is not normalized either in the ctor or in toRotationMatrix.

This either needs to be fixed or documentation updated to indicate that the vector has to be normalized.

Cheers
Ben



--- On Wed, 3/18/09, Tim Winkler <Winkler.Tim@xxxxxxxxx> wrote:

> From: Tim Winkler <Winkler.Tim@xxxxxxxxx>
> Subject: [eigen] AngleAxis toRotationMatrix
> To: eigen@xxxxxxxxxxxxxxxxxxx
> Date: Wednesday, March 18, 2009, 1:19 PM
> Hi,
> 
> could you please give me a hint what I am missing here ?
> shouldnt this be the same ?
> 
> Vector3f ttt = Vector3f(1.0, 2.0, 3.0);
> 
> AngleAxis <float> ax1( 0.7, ttt );
> AngleAxis <float> ax2( 0.7, ttt.normalized() );
> 
> Matrix3f rot1 = ax1.toRotationMatrix();     
> Matrix3f rot2 = ax2.toRotationMatrix();    cout
> <<"diff: "<< rot1 - rot2 << endl;
> 
> from:
> http://eigen.tuxfamily.org/dox/classEigen_1_1AngleAxis.html
> 
> "Represents a 3D rotation as a rotation angle around an
> arbitrary 3D axis."
> 
> 
> Sorry for any inconvenience,
> Tim
> 
> 
>



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