fscanf从txt文件中中读取点云坐标,且文件以";"为分隔符
FILE *fp_txt;
txtPoint_3D txtPoint;
vector<txtPoint_3D> txtPoints;
fp_txt = fopen(readPath.c_str(),"r");
if (fp_txt == NULL){
cerr<<"open error!"<<endl;
}
while (fscanf(fp_txt, "%lf;%lf;%lf", &txtPoint.x, &txtPoint.y, &txtPoint.z) != EOF){
cout<<txtPoint.x<<" "<<txtPoint.y<<" "<<txtPoint.z<<endl;
txtPoints.push_back(txtPoint);
}