c - What's the 3D structurally simplest file format? -


from computations, i've got lot of raw bytes of data. view them not image, 3d relatively-standard file. (c.f. previous question ppm :what simplest rgb image format? )

i put in file header , bunch of struct point, , open file standard 3d file viewer such g3dviewer.

struct point {     unsigned int x; // coordinates     unsigned int y;     unsigned int z;     unsigned char r; // color     unsigned char g;     unsigned char b; } 

i've looked @ .obj file format, forces me translate each point in text line describing cubic vertex.

does simple 3d file format exist ?

the ply format simple.

ply format ascii 1.0 comment object: vertex cloud element vertex 8 property uint x property uint y property uint z property uchar red                   { start of vertex color } property uchar green property uchar blue end_header 0 0 0 255 0 0                         { start of vertex list } 0 0 1 255 0 0 0 1 1 255 0 0 0 1 0 255 0 0 [...] 

in line 4, number of vertices defined.


Comments

Popular posts from this blog

assembly - 8086 TASM: Illegal Indexing Mode -

Java, LWJGL, OpenGL 1.1, decoding BufferedImage to Bytebuffer and binding to OpenGL across classes -

javascript - addthis share facebook and google+ url -