Registered Member
|
Hello,
I was wondering if I am missing a function that allows me to easily generate a 3x3 matrix from an Eigen::Matrix4F? I'm currently doing it in a bit of an unprofessional manner: Eigen::Matrix4f FourByFourMatrix; Eigen::Matrix3f ThreeByThreeMatrix; ThreeByThreeMatrix << FourByFourMatrix(0,0), FourByFourMatrix(0,1), FourByFourMatrix(0,2) .... FourByFourMatrix(2,2); Is there a more straighforward approach to doing this? |
Moderator
|
that's easy:
mat.block<3,3>(startRow,startCol), or mat.topLeftCorner<3,3>(), and all the *Corner variants. see: http://eigen.tuxfamily.org/dox/Tutorial ... tions.html |
Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]