I have the following MatrixXd V, representing points of a 2d shape:
==========================================
Bounding box vertices (AV) (Rows: 8 Cols: 3)
==========================================
[[ 2.367639937564554, 3.100420929531666, 0]
[ 2.367639937564554, 3.100420929531666, 0]
[ 2.367639937564554, -3.097445263635904, 0]
[ 2.367639937564554, -3.097445263635904, 0]
[-2.362324650030633, 3.100420929531666, 0]
[-2.362324650030633, 3.100420929531666, 0]
[-2.362324650030633, -3.097445263635904, 0]
[-2.362324650030633, -3.097445263635904, 0]]
and I want to rotate the shape by this Matrix3d rotation matrix:
==========================================
RM: (RM) (Rows: 3 Cols: 3)
==========================================
[[ 0.997496638487424, -0.07071390391068358, 0]
[ 0.07071390391068358, 0.997496638487424, 0]
[ 0, 0, 1]]
==========================================
I'm not able to figure the correct way to do this... I've checked with transformations:
Affine3d tf = RM;
tf.rotate(V);
Of course this doesn't work, as Eigen reports no viable conversion from 'Eigen::Matrix3d' to 'Eigen::Affine3d'.
In short, how do I tell Eigen to use this rotation matrix (RM) as a transformation and apply it to the target matrix (V)?
As I already have the rotation matrix, I have no reason to use quaternions...
Thank you