71 #define PLY_BINARY_BE 2
72 #define PLY_BINARY_LE 3
79 #define PLY_START_TYPE 0
89 #define PLY_FLOAT32 10
91 #define PLY_END_TYPE 12
162 static PlyFile *ply_write(FILE *,
int,
const char **,
int);
163 static PlyFile *ply_open_for_writing(
const char *,
int,
const char **,
int,
float *);
166 static void ply_element_count(
PlyFile *,
const char *,
int);
167 static void ply_header_complete(
PlyFile *);
168 static void ply_put_element_setup(
PlyFile *,
const char *);
169 static void ply_put_element(
PlyFile *,
void *);
170 static void ply_put_comment(
PlyFile *,
const char *);
171 static void ply_put_obj_info(
PlyFile *,
const char *);
172 static PlyFile *ply_read(FILE *,
int *,
char ***);
173 static PlyFile *ply_open_for_reading(
const char *,
int *,
char ***,
int *,
float *);
178 static void ply_get_element(
PlyFile *,
void *);
179 static char **ply_get_comments(
PlyFile *,
int *);
180 static char **ply_get_obj_info(
PlyFile *,
int *);
181 static void ply_close(
PlyFile *);
182 static void ply_get_info(
PlyFile *,
float *,
int *);
185 static void ply_put_other_elements (
PlyFile *);
191 static bool equal_strings(
const char *,
const char *);
194 static void write_scalar_type (FILE *,
int);
195 static char **get_words(FILE *,
int *,
char **);
196 static char **old_get_words(FILE *,
int *);
197 static void write_binary_item(
PlyFile *,
int,
unsigned int,
double,
int);
198 static void write_ascii_item(FILE *,
int,
unsigned int,
double,
int);
199 static double old_write_ascii_item(FILE *,
char *,
int);
200 static void add_element(
PlyFile *,
char **,
int);
201 static void add_property(
PlyFile *,
char **,
int);
202 static void add_comment(
PlyFile *,
char *);
203 static void add_obj_info(
PlyFile *,
char *);
205 static void store_item(
char *,
int,
int,
unsigned int,
double);
206 static void get_stored_item(
const void *,
int,
int *,
unsigned int *,
double *);
207 static double get_item_value(
const char *,
int);
208 static void get_ascii_item(
const char *,
int,
int *,
unsigned int *,
double *);
209 static void get_binary_item(
PlyFile *,
int,
int *,
unsigned int *,
double *);
210 static void ascii_get_element(
PlyFile *,
char *);
211 static void binary_get_element(
PlyFile *,
char *);
212 static void *my_alloc(
size_t,
int,
const char *);
213 static int get_prop_type(
const char *);
struct PlyOtherElems PlyOtherElems
PlyOtherElems * other_elems
PlyOtherProp * other_props
struct OtherData OtherData
struct PlyProperty PlyProperty
struct PlyElement PlyElement
a modified version of the PLY 1.1 library
struct OtherElem OtherElem
struct PlyOtherProp PlyOtherProp