|Re: [eigen] Euler-angles and partial reductions API design|
[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]
And, now that I understand why you have an AngleAxis class, I also understand why you naturally added EulerAngles as a pure convenience, even without trying to make it as fast as possible. Now I agree it's always a good thing to have. Cheers, Benoit On Saturday 19 July 2008 01:08:35 Benoît Jacob wrote: > Ah OK, I didn't realize that. Thanks for the explanation. > > Benoit > > On Saturday 19 July 2008 00:58:30 Gael Guennebaud wrote: > > well, I would prefer to keep the AngleAxis class, for various reasons. > > One of them is that we also have the Quaternion, so you create an > > angle axis and it gets automatically converted to whatever you want: > > > > Quaternion q = AngleAxis(a,b); > > Matrix m = AngleAxis(a,b); > > > > that is pretty nice IMO, and Matrix3f::Rotation(a,b) will never be as > > explicit as AngleAxis(a,b), isn't it ? > > > > I also have to say that since two angle-axis cannot be directly > > composed, AngleAxis(a,b) * AngleAxis(c,d) must convert the two > > operands to a quaternion or a matrix. In practice, converting them to > > Quaternion is always faster even if at the end you want a matrix (and > > even if you have special AngleAxis to rotation matrix conversion > > functions for rotation around basis axes). > > > > gael. > > > > > one more remark, > > > > > > if we drop EulerAngles then we can also drop the AngleAxis class in > > > favor of just "rotation" functions, not classes. so the above snippet > > > becomes > > > > > > Matrix3f m2 = Matrix3f::rotation(a1, Vector3f(1,0,0)) > > > * Matrix3f::rotation(a2, Vector3f(0,1,0)) > > > * Matrix3f::rotation(a3, Vector3f(0,0,1)); > > > > > > I think that's nicer! > > > > > > Cheers, > > > Benoit
Description: This is a digitally signed message part.
|Mail converted by MHonArc 2.6.19+||http://listengine.tuxfamily.org/|