所要读取的文件格式,所要输出的文件样式,直接把点云数据的一部分贴上来
#include
using namespace std;
ifstream myfile("D:/test.txt");
char buffer[256];
glBegin(GL_POINTS);
while (myfile.peek() != EOF)
{
myfile.getline(buffer, 200);
sscanf_s(buffer, "%f,%f,%f", &x, &y, &z);
glVertex3f(x, y, z);
}
glEnd();
opengl读取点云的