PLY Files II

来源:互联网 发布:android游戏编程之从零开始 编辑:程序博客网 时间:2024/06/08 17:46

-----------------------------------------------------

ply                               //ply_create()
format ascii 1.0
comment VCGLIB generated
element vertex 6479   //ply_add_element(handle, "vertex", vertexCount);
property floatx           //ply_add_scalar_property(handle, "x", PLY_FLOAT);       
property float y
property float z
property float nx
property float ny
property float nz     
//......"s"  "t" (纹理坐标)......   
property int flags
property uchar red
property uchar green
property uchar blue
property uchar alpha
element face 12954   //ply_add_element(handle, "face", faceCount); 
property list uchar int vertex_indices  //ply_add_list_property(handle, "vertex_indices", PLY_UCHAR, PLY_INT);   
property int flags
end_header         //ply_write_header(handle)
0.0363526 0.0894518 0.0166275 -2.58589 -5.26492 -2.22414 0 175 160 84 255 
0.0389934 0.088225 0.0166275 -2.52566 -5.33 -2.15753 0 170 156 88 255 
0.0389934 0.0894518 0.0138336 -2.41584 -5.1918 -2.5521 0 146 145 86 255 
0.0340731 0.0894518 0.0200012 -2.865 -5.39322 -1.43764 0 174 151 78 255 
0.0356197 0.0886338 0.0200012 -2.74755 -5.42387 -1.53245 0 168 145 74 255 
0.0356197 0.0894518 0.0175829 -2.64306 -5.36739 -1.90754 0 171 156 75 255    

ply_write( (x, y, z) + (nx, ny, nz) + (s, t) )   //一组顶点坐标对应一组法线、纹理坐标

ply_write( (x, y, z) + (nx, ny, nz) + (s, t) )  

......

ply_close()


OpenGL读取PLY模型文件并绘制 Read ply model and draw it by OpenGL

http://www.tuicool.com/articles/zYRz6j



PLY文件格式

http://wenku.baidu.com/link?url=1IqNwFlLlmK9MFSROhiS5KoLRyx3Vo47jEBVf46kix31T7uAnU28JOQiZ7JK36Utu04lLsF0ckUvEyk5jhq_Hq_RBOImgtrWlj4VMeBNaK7


PLY文件

http://blog.sina.com.cn/s/blog_73ee929c01017unh.html





0 0