#include #include int main() { struct kalmia_t *k = kalmia_parse_file("suzanne.dae"); if (k == NULL) { fprintf(stderr, "Failed to read file!\n"); return 1; } printf( "library_geometries[id=%s, name=%s]\n", k->library_geometries->id, k->library_geometries->name ); int i; for (i=0; ilibrary_geometries->geometry_count; i++) { struct ka_geometry_t *g = k->library_geometries->geometry + i; printf(" geometry[id=%s, name=%s]\n", g->id, g->name); printf(" mesh\n"); int j; for (j=0; jmesh.source_count; j++) { struct ka_source_t s = g->mesh.source[j]; printf(" source[id=%s, name=%s]\n", s.id, s.name); } for (j=0; jmesh.triangles_count; j++) { struct ka_triangles_t t = g->mesh.triangles[j]; printf(" triangles[name=%s, count=%d, material=%s]\n", t.name, t.count, t.material); } } kalmia_destroy(k); return 0; }