diff options
author | Vito Caputo <vcaputo@pengaru.com> | 2018-05-18 14:23:58 -0700 |
---|---|---|
committer | Vito Caputo <vcaputo@pengaru.com> | 2018-05-18 14:23:58 -0700 |
commit | 81b124b57cdd6a468990c969b1ccdfb02100f606 (patch) | |
tree | 6d9947115a4bc575b0770953764e68cfeca3a9c2 /src | |
parent | c984f4e13279a63391fef5137038e8243810847c (diff) |
test: update test.c to conform to latest api state
Diffstat (limited to 'src')
-rw-r--r-- | src/test.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -29,7 +29,7 @@ typedef struct aabb_t { } aabb_t; -ix2_search_status_t cb(void *cb_context, ix2_object_t *ix2_object, aabb_t *ix2_object_aabb, void *object) +ix2_search_status_t cb(void *cb_context, ix2_object_t *ix2_object, v2f_t *ix2_object_position, aabb_t *ix2_object_aabb, void *object) { fprintf(stderr, "found %p ix2_object=%p ix2_object_aabb=%f,%f ... %f,%f\n", cb_context, ix2_object, ix2_object_aabb->min.x, ix2_object_aabb->min.y, ix2_object_aabb->max.x, ix2_object_aabb->max.y); @@ -64,7 +64,7 @@ int main(int argc, char *argv[]) } for (int i = 0; i < sizeof(objects) / sizeof(*objects); i++) { - objects[i].ix = ix2_insert_object(ix2, &objects[i].aabb, &objects[i]); + objects[i].ix = ix2_object_new(ix2, 0, 0, &objects[i].aabb, &objects[i]); if (!o) { fprintf(stderr, "unable to insert object %i\n", i); return 1; @@ -86,14 +86,14 @@ int main(int argc, char *argv[]) for (int i = 0; i < sizeof(objects) / sizeof(*objects); i++) { /* TODO: actually verify the expected objects are hit */ - if (!ix2_search_by_aabb(ix2, &objects[i].aabb, cb, &objects[i])) { + if (!ix2_search_by_aabb(ix2, 0, 0, &objects[i].aabb, cb, &objects[i])) { fprintf(stderr, "unable to lookup object %i by perfect aabb\n", i); return 1; } } for (int i = 0; i < sizeof(objects) / sizeof(*objects); i++) - ix2_remove_object(ix2, objects[i].ix); + ix2_object_free(ix2, objects[i].ix); ix2_free(ix2); |