Summary: | Add FromAxes static function to Quaternion | ||
---|---|---|---|
Product: | Eigen | Reporter: | Andy Somerville <andy.somerville> |
Component: | Geometry | Assignee: | Nobody <eigen.nobody> |
Status: | NEW --- | ||
Severity: | enhancement | CC: | chtz, gael.guennebaud, hauke.heibel, jacob.benoit.1 |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | All | ||
Whiteboard: |
Description
Andy Somerville
2012-09-25 21:23:40 UTC
you can already do quat = mat3x3 so I'm not sure a "FromAxes" is that useful? You're right, it's certainly hiding that much complexity, though that's true of many parts of the API. To me, the power of Eigen is that, despite that I've forgotten how to implement half of this stuff, I'm still able to perform powerful geometry calculations A) without having to look up how to do them, and B) while keeping my code clean and uncomplicated. Using the 3x3 requires knowledge that you can create a rotation matrix by setting the columns to the 3 axes. Elementary perhaps, but when I went to do this very thing, I had forgotten and had to look it up. I've already added such a function to my (tiny) personal Eigen utility library, but I'm of the opinion that most things that end up in utility libraries should really be in the API of the superordinate library. I agree with Gael that it wouldn't add much, o.t.o.h it would not hurt either. It may even add a bit if it has a usefully defined behavior if the axes are not orthonormal. E.g. if the vectors are orthogonal but not orthonormal an obvious choice would be to normalize each vector (for 3x3 matrices it wouldn't be obvious whether rows or columns are normalized). What shall happen if the 3 axes describe a left-handed system instead of a right-handed? Why would you need the third axis anyways?, if the axes are valid the relation z==x.cross(y) should hold. Should the method do some kind of least-squares fit if that's not the case? Another question is the name of the method, as there is already a method Quaternion::FromTwoVectors which has a totally different definition (ok, the difference between "Vectors" and "Axes" might be high enough to avoid confusion and I guess you need to look up the definition anyways). -- GitLab Migration Automatic Message -- This bug has been migrated to gitlab.com's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.com/libeigen/eigen/issues/513. |