API

  1. Eigen::Matrix<double, 2, 3>: Matrix4f is a 2x3 matrix of doubles
  1. Eigen::Isometry

    Eigen::Isometry3d T1=Eigen::Isometry3d::Identity();
    T1=Eigen::Isometry3d::Identity();
    T1.rotate(rotation_matrix1);
    T1.pretranslate(t1);
  2. Eigen::Matrix4d

    Eigen::Matrix4d T2;
    T2.setIdentity();
    T2.block<3,3>(0,0) = rotation_matrix1;
    T2.block<3,1>(0,3) = t1;
  3. Create Rotation Matrix from Eigen::AngleAxisd

    Eigen::AngleAxisd rotation_x = Eigen::AngleAxisd(-0.5 * M_PI, Eigen::Vector3d::UnitX());
    Eigen::AngleAxisd rotation_y = Eigen::AngleAxisd(0.5 * M_PI, Eigen::Vector3d::UnitY());
    
    Eigen::Matrix3d rotation_matrix = rotation_x.matrix() * rotation_y.matrix();

Using block operations

  1. m.leftCols(2)
  1. m.bottomRows<2>()

Column-major and row-major storage

  1. Row-major

    Matrix is stored in row-major order if it is stored row by row. The entire first row is stored first, followed by the entire second row, and so on.

    If this matrix(1) is stored in row-major order, then the entries are laid out in memory as follows:

    1 2 3 4 5 6 ... 15 16

  2. Column-major

    If it is stored in col-major order, it is laid out as follows: 1 5 9 13 2 6 ... 12 16