This bugzilla service is closed. All entries have been migrated to https://gitlab.com/libeigen/eigen
Bug 439 - Quaternion's `setFromTwoVectors` should be either/both of a static function or/and a constructor of Quaternion
Summary: Quaternion's `setFromTwoVectors` should be either/both of a static function o...
Status: RESOLVED FIXED
Alias: None
Product: Eigen
Classification: Unclassified
Component: Geometry (show other bugs)
Version: unspecified
Hardware: All All
: Normal enhancement
Assignee: Nobody
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 3.1
  Show dependency treegraph
 
Reported: 2012-03-20 01:03 UTC by Andy Somerville
Modified: 2019-12-04 11:33 UTC (History)
3 users (show)



Attachments
Patch to add FromTwoVectors static function (2.76 KB, patch)
2012-03-22 01:54 UTC, Andy Somerville
andy.somerville: review? (gael.guennebaud)
Details | Diff

Description Andy Somerville 2012-03-20 01:03:33 UTC
setFromTwoVectors AFAIK is (almost always?) used รก la mode de AngleAxis or Identity. 

As such it seems that it should exist as either a constructor or static function.
Comment 1 Gael Guennebaud 2012-03-22 00:58:44 UTC
good point to add a FromTwoVectors static function. For the ctor, I'm not fan because it would be quite confusing.
Comment 2 Andy Somerville 2012-03-22 01:54:08 UTC
Created attachment 260 [details]
Patch to add FromTwoVectors static function

Static function which calls the non-static.

Copy pasted the unit test, and ran unit test.
Comment 3 Gael Guennebaud 2012-03-26 18:33:20 UTC
thanks for the patch, I committed a variant: this function has to be part of Quaternion, not QuaternionBase.

https://bitbucket.org/eigen/eigen/changeset/e74656e54f88/
changeset:   e74656e54f88
user:        ggael
date:        2012-03-26 18:30:04
summary:     fix bug 439: add Quaternion::FromTwoVectors() static constructor
Comment 4 Andy Somerville 2012-03-26 18:53:25 UTC
Thanks for the quick action! : )
Comment 5 Nobody 2019-12-04 11:33:43 UTC
-- 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/439.

Note You need to log in before you can comment on or make changes to this bug.