|
|
|
@ -1,6 +1,8 @@
|
|
|
|
|
#ifndef PLY_H
|
|
|
|
|
#define PLY_H
|
|
|
|
|
|
|
|
|
|
#include <stddef.h>
|
|
|
|
|
|
|
|
|
|
typedef enum {
|
|
|
|
|
PLY_FORMAT_INVALID = -1,
|
|
|
|
|
PLY_FORMAT_ASCII,
|
|
|
|
@ -46,6 +48,42 @@ typedef struct PlyElementStruct {
|
|
|
|
|
struct PlyElementStruct* next;
|
|
|
|
|
} PlyElement;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
char* ply_formats[] = {
|
|
|
|
|
"ascii",
|
|
|
|
|
"binary_little_endian",
|
|
|
|
|
"binary_big_endian"
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
char* ply_header_items[] = {
|
|
|
|
|
"comment",
|
|
|
|
|
"end_header",
|
|
|
|
|
"element",
|
|
|
|
|
"property",
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
char* ply_type_strings[] = {
|
|
|
|
|
"char",
|
|
|
|
|
"uchar",
|
|
|
|
|
"short",
|
|
|
|
|
"ushort",
|
|
|
|
|
"int",
|
|
|
|
|
"uint",
|
|
|
|
|
"float",
|
|
|
|
|
"double",
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
size_t ply_type_sizes[] = {
|
|
|
|
|
1,
|
|
|
|
|
1,
|
|
|
|
|
2,
|
|
|
|
|
2,
|
|
|
|
|
4,
|
|
|
|
|
4,
|
|
|
|
|
4,
|
|
|
|
|
8,
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
PlyElement* ply_load_mesh(char* filename);
|
|
|
|
|
void ply_free_mesh(PlyElement* elements_head);
|
|
|
|
|
|
|
|
|
|