documentation - What is the difference between computeScalingRotation and computeRotationScaling -


in the documentation of eigen's transform class, there 2 member functions identical signatures:

void computerotationscaling(rotationmatrixtype*, scalingmatrixtype*) const void computescalingrotation(scalingmatrixtype*, rotationmatrixtype*) const 

both functions have identical documentation (the multiplication order rotation * scaling in both functions).

decomposes linear part of transformation product rotation x scaling, scaling being not positive.

if either pointer zero, corresponding computation skipped.

this defined in svd module.

what difference between them?

there difference in order. if closely, difference is:

// computerotationscaling if(scaling) scaling->lazyassign(svd.matrixv() * sv.asdiagonal() * svd.matrixv().adjoint()); // computescalingrotation if(scaling) scaling->lazyassign(svd.matrixu() * sv.asdiagonal() * svd.matrixu().adjoint()); //                                        ^                                 ^ 

Comments

Popular posts from this blog

javascript - Thinglink image not visible until browser resize -

firebird - Error "invalid transaction handle (expecting explicit transaction start)" executing script from Delphi -

mongodb - How to keep track of users making Stripe Payments -