is there a base type of vector as MatrixBase in eigen?
template
void test(Eigen::MatrixBase& R, const double deg, const Vector3d& u) {
R = Eigen::MatrixBase<Derived>::Identity(3, 3);
Vector3d u_ = u / u.norm();
for (int i = 0; i < 3; i++) {
Vector3d v = R.col(i);
R.col(i) = v * cos(deg) + u_.cross(v) * sin(deg) + (1 - cos(deg)) * (u_.dot(v)) * u_;
}
}
I have a method taking MatrixXd/MatrixXf and Vector3d/Vector3f as inputs, I know I can make the first one as template type,but how to use the template of Vector3d ?