0
我的测试方法如下:征:: Affine3d旋转意想不到的结果
TEST_METHOD(RotationTest1)
{
std::stringstream log;
Eigen::Affine3d t(
Eigen::AngleAxisd(M_PI/4, Eigen::Vector3d::UnitZ())*
Eigen::AngleAxisd(M_PI/8, Eigen::Vector3d::UnitY())
);
log << "Expected:\n" << t.rotation();
Eigen::Affine3d act;
act = Eigen::AngleAxisd(M_PI/4, Eigen::Vector3d::UnitZ())*
Eigen::AngleAxisd(M_PI/8, Eigen::Vector3d::UnitY()) * act;
//act.prerotate(Eigen::AngleAxisd(M_PI/8, Eigen::Vector3d::UnitY()));
//act.prerotate(Eigen::AngleAxisd(M_PI/4, Eigen::Vector3d::UnitZ()));
log << "\nActual:\n" << act.rotation();
Logger::WriteMessage(log.str().c_str());
Assert::IsTrue(t.rotation().isApprox(act.rotation()));
}
这产生了以下不一致输出:
Expected:
0.653281 -0.707107 0.270598
0.653281 0.707107 0.270598
-0.382683 0 0.92388
Actual:
-0.756394 0.645492 -0.10587
-0.324051 -0.510375 -0.79656
-0.568206 -0.568206 0.595217
有人可以给我解释上述行为,请?
或只是在产品链的删除权的行为实例。 – ggael