#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;
}
herrDeng網內搜尋
自訂搜尋
Ads
2023年12月13日 星期三
從bag檔中擷取Ply檔,並用3D軟體開啟,C++程式讀取
訂閱:
張貼留言 (Atom)
熱門文章
-
用 while loop 算 s=3*3+4*4+....88*88
-
33, 45, 87, 99, 27 算平均
-
輸出課表代碼矩陣 Hint: 2-D array, double-for loop
-
計算你上學期加權平均
-
連續複利
-
問int怎麼存-689這個數字。 int用4個bytes。 答案請用16進位表達。
-
產生10個0~99的亂數存在a[10] 中
-
data structure 期中考乙
沒有留言:
張貼留言