diff options
author | Vito Caputo <vcaputo@pengaru.com> | 2018-12-27 01:54:30 -0800 |
---|---|---|
committer | Vito Caputo <vcaputo@pengaru.com> | 2018-12-27 01:54:30 -0800 |
commit | 3cf38d5f3cacc8db44b4d104d0374100cfa57c32 (patch) | |
tree | c6829a4bd002ed72c83492fe329563c72efa209e /src/ix3.h | |
parent | 6a2ee7ef7198d23ba89429683bebaf553ec2a1fa (diff) |
libix3: add ix3_search_by_aabb_cb()
This exposes a callback interface for supplying the AABB overlap
test used to determine node traversal and object filtering.
In advanced use cases like transformed 3D inersection testing of
two ix3 instances one needs to run user-supplied code in the
tree traversal with the node AABBs provided for e.g. transformed
searches against another ix3.
Other than the new ix3_aabb_cb_t hook, its use is identical to
ix3_search_by_aabb().
Diffstat (limited to 'src/ix3.h')
-rw-r--r-- | src/ix3.h | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -30,6 +30,7 @@ typedef enum ix3_search_status_t { } ix3_search_status_t; typedef ix3_search_status_t (ix3_object_cb_t)(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_aabb_cb_t)(void *cb_context, const bb3f_t *ix3_node_aabb); ix3_t * ix3_new(bb3f_t *aabb, unsigned max_per_node, unsigned max_depth, unsigned max_asip); void ix3_free(ix3_t *ix3); @@ -41,5 +42,6 @@ int ix3_object_aabb_overlap(ix3_t *ix3, ix3_object_t *object, v3f_t *aabb_positi unsigned ix3_search_by_point(ix3_t *ix3, v3f_t *point, ix3_object_cb_t *cb, void *arg); unsigned ix3_search_by_aabb(ix3_t *ix3, v3f_t *search_position, v3f_t *search_origin, bb3f_t *search_aabb, ix3_object_cb_t *cb, void *arg); unsigned ix3_search_by_ray(ix3_t *ix3, v3f_t *origin, v3f_t *direction, ix3_object_cb_t *cb, void *arg); +unsigned ix3_search_by_aabb_cb(ix3_t *ix3, ix3_aabb_cb_t *aabb_cb, void *aabb_cb_context, ix3_object_cb_t *object_cb, void *object_cb_context); #endif |