#include #include #include ts_bool xml_trisurf_data(FILE *fh, ts_vesicle *vesicle){ xml_trisurf_header(fh, vesicle); xml_trisurf_tria(fh,vesicle->tlist); xml_trisurf_tria_neigh(fh,vesicle->tlist); xml_trisurf_vtx_neigh(fh,vesicle->vlist); xml_trisurf_vtx_tristar(fh,vesicle->vlist); xml_trisurf_footer(fh); return TS_SUCCESS; } ts_bool xml_trisurf_header(FILE *fh, ts_vesicle *vesicle){ fprintf(fh, "\n", vesicle->vlist->n, vesicle->poly_list->n, vesicle->poly_list->poly[0]->vlist->n); return TS_SUCCESS; } ts_bool xml_trisurf_footer(FILE *fh){ fprintf(fh, "\n"); return TS_SUCCESS; } ts_bool xml_trisurf_tria(FILE *fh, ts_triangle_list *tlist){ ts_uint i; fprintf(fh,"\n"); for(i=0; in;i++){ fprintf(fh,"%u %u %u\n",tlist->tria[i]->vertex[0]->idx, tlist->tria[i]->vertex[1]->idx, tlist->tria[i]->vertex[2]->idx); } fprintf(fh,"\n"); return TS_SUCCESS; } ts_bool xml_trisurf_tria_neigh(FILE *fh, ts_triangle_list *tlist){ ts_uint i; fprintf(fh,"\n"); for(i=0; in;i++){ fprintf(fh,"%u %u %u\n",tlist->tria[i]->neigh[0]->idx, tlist->tria[i]->neigh[1]->idx, tlist->tria[i]->neigh[2]->idx); } fprintf(fh,"\n"); return TS_SUCCESS; } ts_bool xml_trisurf_vtx_neigh(FILE *fh, ts_vertex_list *vlist){ ts_uint i,j; for(i=0;in;i++){ fprintf(fh,"",vlist->vtx[i]->idx); for(j=0;jvtx[i]->neigh_no;j++){ fprintf(fh,"%u ",vlist->vtx[i]->neigh[j]->idx); } fprintf(fh, "\n"); } return TS_SUCCESS; } ts_bool xml_trisurf_vtx_tristar(FILE *fh, ts_vertex_list *vlist){ ts_uint i,j; for(i=0;in;i++){ fprintf(fh,"",vlist->vtx[i]->idx); for(j=0;jvtx[i]->tristar_no;j++){ fprintf(fh,"%u ",vlist->vtx[i]->tristar[j]->idx); } fprintf(fh, "\n"); } return TS_SUCCESS; }