Registered Member
|
Hello
Creating my Transform object as follows:
I get the error: conversion from ‘Eigen::AngleAxisd’ to non-scalar type ‘Eigen::Matrix3d’ requested So AngleAxis is not a matrix? how else can I create an AngleAxis, to rotate a vector to be parallel to another vector? Best regards Moataz |
Moderator
|
An AngleAxis is... and angle + an axis, but it provides conversion to quaternion and 3x3 matrices, the following should work:
Eigen::Matrix3d m ( AngleAxisd(diffAngle,zeroVec.cross(refVector)) ); or: Eigen::Matrix3d m; m = AngleAxisd(diffAngle,zeroVec.cross(refVector)); The reason is that the conversion constructor is explicit and C++ has a weird rule with that respect. |
Registered Member
|
of course
Thank you very much!! worked like a charm |
Registered users: Bing [Bot], claydoh, Google [Bot], rblackwell, Yahoo [Bot]