Re: [eigen] get scaling out of transform? |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] get scaling out of transform?
- From: Benoit Jacob <jacob.benoit.1@xxxxxxxxx>
- Date: Thu, 22 Jan 2009 17:45:07 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=KG+YGYflAz04KBvuwk4BZJlxufwjEfk1r8HzlBJHjlE=; b=KYxAbIw+35UUBkWnBplDemN1UoxQCQHxQrC/r/Mm3TB6i0oZIeW+VIHgKdWSdLcJ+k SkXkEziLXVxKhXyxmVLiRcdgXLIQV1xK0s3cjCVq1EBFxrC5IjUSt/ibm9yzvgR/L2ei icjWn+oEgK3oRs5fEoRoe4vmvNwHGJuESV6KM=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=TTWutb6w2XqRyXrDno0toO+kJUpZJMbJ0en1TME0uWVNdz7TDrV/LZhK2wD76JLoSG /sB0heBmZpR6EbDBClNZAczXAvnrFjQG2dwzADblUZSWRprKBtXku8acpZgJ33tFLZYG 4OsLpIC/O5yFjMiGtnuwEiquV3x8ioiub1KTY=
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