#include #include #include #include #include "../matrix/matrix_types.h" #include "../matrix/matrix.h" #include "FEVtypes.h" #include "FEV.h" /* the two-pass algorithm to construct a data structure with pointers from its printable description*/ /* reconstructs FEV -style data structures with pointers from a human-readable file describing p_face_t -style printable structures that live in arrays and have int indices instead of pointers. */ #define SIZE 16 vertex_t V[SIZE]; face_t F[SIZE]; edge_t E[SIZE]; /* for reconstituting pstructs on disk into pointers*/ /* This main was used in debugging... give it a file in proper archival format. main () { FILE *FP; char in_file[64]; face_t new_head_pointer; int i, pstruct_count, pstruct_type; printf("\n welcome. input pstruct filename:"); scanf("%s", in_file); FP = fopen(in_file, "r"); new_head_pointer = file_make_structs(FP); rewind(FP); file_link_structs(FP); short_poly_pr(new_head_pointer); edge_ring_pr(E[0]); for (i = 0;ito_vertex =V[tvndx]; /* .... */ } read_link_face(FILE *FP) { int type, ser; int endx, fndx; face_t newface; /* and this*/ }