This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Rotation between two Vector3f

Tags: None
(comma "," separated)
arennuit
Registered Member
Posts
28
Karma
0

Rotation between two Vector3f

Tue Nov 26, 2013 3:31 pm
Hello,

Is there a way to get the rotation vector between 2 Vector3f? i.e. vector rotVec below computed out of the 2 input Vector3f v0 and v1:

rotVec = v0 ^ v1 / |v0 ^ v1| * arccos(v0 * v1)

If not, should I extend Eigen using EIGEN_MATRIXBASE_PLUGIN?

Thanks!
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS

Re: Rotation between two Vector3f

Tue Nov 26, 2013 9:16 pm
Eigen does not support this representation of rotations because it is not usable (though it is compact). However, you can construct a Quaternion: http://eigen.tuxfamily.org/dox/classEig ... cadf821452
arennuit
Registered Member
Posts
28
Karma
0

Re: Rotation between two Vector3f

Wed Nov 27, 2013 9:09 am
Thanks for this answer "to the point", very useful!

PS: I work in R&D for animation and reconstruction and I can assure you I use this rotation representation every day. But let's not get into this controversy ;)


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]