Re: [eigen] get scaling out of transform?

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


2009/1/21 Ben Axelrod <baxelrod@xxxxxxxxxxxx>:
> How can I get the scaling info out of the Transform class?

Ben,

Since today you can now do:

Transform3d t;
Matrix3d rotation, scaling;
t.computeRotationScaling(&rotation, &scaling);

---OR---

t.computeRotationScaling(&scaling, &rotation);

depending of whether you want to decompose the linear part of your
Transform as a product rotation*scaling or as a product
scaling*rotation.

The rotation that you'll get is the same in both cases. You can
equivalently get it by the rotation() method.

The scaling, on the other hand, is really different.

The current implementation is slow as it relies on SVD that is not yet
optimized.

An implementation based on SelfAdjointEigenSolver would require 2
diagonalizations, which would be slower than 1 SVD.

Cheers,
Benoit



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