#include <iostream> #include <fstream> #include <string> using namespace std; int main() { cout<<"讀取PLY檔前20行資訊\n"; fstream fin("shiba0.ply"); string tmp; do{ getline(fin, tmp); cout<<tmp<<"\n"; } while(tmp!="end_header"); float x, y, z; float nx, ny, nz; unsigned R, G, B; fin>>x>>y>>z>>nx>>ny>>nz>>R>>G>>B; cout<<x<<","<<y<<","<<z<<"\n"; cout<<nx<<","<<ny<<","<<nz<<"\n"; cout<<R<<","<<G<<","<<B<<"\n"; fin.close(); return 0; }
沒有留言:
張貼留言
HTML 編輯器