Re: [eigen] alpha6!

[ Thread Index | Date Index | More Archives ]

> > My only issue is the usage of the operator Matrix3f()
> in
> > AngleAxis and Quaterion and operator Scalar() and
> others in Rotation2d. The
> > toMatrix() is clearer and less error prone IMHO.
> As you can see in the code,
>   operator Matrix3 () const { return toRotationMatrix(); }
> the method you're asking for is named
> toRotationMatrix(). Do you think then 
> that it is a bad thing to also have the conversion
> operator? I can't really 
> see how it could be dangerous. One can also discuss whether
> it is better to 
> have an operator like this or a Matrix constructor. I
> don't really know... 
> this is Gael's work btw.

I just caution against operator ...() because I've run into several situations where it causes bugs. I prefer explicit casting because it's more obvious (for you and the compiler) what's going on.


Mail converted by MHonArc 2.6.19+