summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@pengaru.com>2018-12-01 01:18:25 -0800
committerVito Caputo <vcaputo@pengaru.com>2018-12-01 01:18:25 -0800
commit3213568475aff1d67da763153ab484377d5c1497 (patch)
tree32b5825dc726db5c2971e66b9a22a2630c592a19
parent2186240198bd82ecd08cac8937bed2b3c4e29623 (diff)
libix3: drop pointer from ix3_search_cb typedef
-rw-r--r--src/ix3.c4
-rw-r--r--src/ix3.h8
2 files changed, 6 insertions, 6 deletions
diff --git a/src/ix3.c b/src/ix3.c
index ea8e46d..ab5af8c 100644
--- a/src/ix3.c
+++ b/src/ix3.c
@@ -631,7 +631,7 @@ ix3_object_t * ix3_object_move(ix3_t *ix3, ix3_object_t *object, v3f_t *object_p
/* Search for objects overlapping a point in index ix3. */
/* Returns number of cb calls performed on hits, if cb is NULL calls will be skipped but hits still counted for return. */
-unsigned ix3_search_by_point(ix3_t *ix3, v3f_t *point, ix3_search_cb cb, void *cb_context)
+unsigned ix3_search_by_point(ix3_t *ix3, v3f_t *point, ix3_search_cb *cb, void *cb_context)
{
unsigned n_hits = 0;
ix3_object_ref_t *ref, *_ref;
@@ -737,7 +737,7 @@ static void search_node_by_aabb(ix3_node_t *node, bb3f_t *node_aabb, v3f_t *sear
/* Search for objects overlapping an aabb in index ix3. */
/* Returns number of cb calls performed on hits, if cb is NULL calls will be skipped but hits still counted for return. */
-unsigned ix3_search_by_aabb(ix3_t *ix3, v3f_t *search_position, v3f_t *search_origin, bb3f_t *search_aabb, ix3_search_cb cb, void *cb_context)
+unsigned ix3_search_by_aabb(ix3_t *ix3, v3f_t *search_position, v3f_t *search_origin, bb3f_t *search_aabb, ix3_search_cb *cb, void *cb_context)
{
unsigned n_hits = 0;
LIST_HEAD (hits);
diff --git a/src/ix3.h b/src/ix3.h
index f850b81..8739bf3 100644
--- a/src/ix3.h
+++ b/src/ix3.h
@@ -29,7 +29,7 @@ typedef enum ix3_search_status_t {
IX3_SEARCH_MORE_HIT,
} ix3_search_status_t;
-typedef ix3_search_status_t (*ix3_search_cb)(void *cb_context, ix3_object_t *ix3_object, v3f_t *ix3_object_position, bb3f_t *ix3_object_aabb, void *object);
+typedef ix3_search_status_t (ix3_search_cb)(void *cb_context, ix3_object_t *ix3_object, v3f_t *ix3_object_position, bb3f_t *ix3_object_aabb, void *object);
ix3_t * ix3_new(bb3f_t *aabb, unsigned max_per_node, unsigned max_depth);
void ix3_free(ix3_t *ix3);
@@ -38,8 +38,8 @@ void ix3_reset(ix3_t *ix3);
void ix3_object_free(ix3_t *ix3, ix3_object_t *object);
ix3_object_t * ix3_object_move(ix3_t *ix3, ix3_object_t *object, v3f_t *object_position, v3f_t *object_origin, bb3f_t *object_aabb);
int ix3_object_aabb_overlap(ix3_t *ix3, ix3_object_t *object, v3f_t *aabb_position, v3f_t *aabb_origin, bb3f_t *aabb);
-unsigned ix3_search_by_point(ix3_t *ix3, v3f_t *point, ix3_search_cb cb, void *arg);
-unsigned ix3_search_by_aabb(ix3_t *ix3, v3f_t *search_position, v3f_t *search_origin, bb3f_t *search_aabb, ix3_search_cb cb, void *arg);
-unsigned ix3_search_by_ray(ix3_t *ix3, v3f_t *origin, v3f_t *direction, ix3_search_cb cb, void *arg);
+unsigned ix3_search_by_point(ix3_t *ix3, v3f_t *point, ix3_search_cb *cb, void *arg);
+unsigned ix3_search_by_aabb(ix3_t *ix3, v3f_t *search_position, v3f_t *search_origin, bb3f_t *search_aabb, ix3_search_cb *cb, void *arg);
+unsigned ix3_search_by_ray(ix3_t *ix3, v3f_t *origin, v3f_t *direction, ix3_search_cb *cb, void *arg);
#endif
© All Rights Reserved