代码,运行结果
if (mSetting)
mpLocalMapper->mThFarPoints = mSetting->thFarPoints();
else
mpLocalMapper->mThFarPoints = fsSettings["thFarPoints"];
// ? 这里有个疑问,C++中浮点型跟0比较是否用精确?
if (mpLocalMapper->mThFarPoints != 0) {
cout << "Discard points further than " << mpLocalMapper->mThFarPoints << " m from current camera" << endl;
mpLocalMapper->mbFarPoints = true;
} else{
mpLocalMapper->mbFarPoints = false;
cout << "Compare points further than " << mpLocalMapper->mThFarPoints << " m from current camera" << endl;
}
结果
Compare points further than 0 m from current camera