Reputation: 18870
I have a 3*3 matrix, and want to translate each column.
#include <Eigen/geometry>
using namespace Eigen;
int main()
{
Translation3d tr(1,2,3);
Matrix3d m; m<<1,2,3,4,5,6,7,8,9;
// m = tr * m; //will not work
}
Don't have a clue from the Eigen manual...
Upvotes: 0
Views: 98
Reputation: 553
The manual says Translation
is not to be used directly.
For transforms, you will likely want Affine3d
, but note that your matrix m
is not a homogeneus matrix, so you either change it to be 4x4
or use another Affine3d
object.
Upvotes: 1