Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/blenlib/BLI_kdopbvh.h')
-rw-r--r--source/blender/blenlib/BLI_kdopbvh.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/source/blender/blenlib/BLI_kdopbvh.h b/source/blender/blenlib/BLI_kdopbvh.h
index c92f40c67bf..e7cbe05d713 100644
--- a/source/blender/blenlib/BLI_kdopbvh.h
+++ b/source/blender/blenlib/BLI_kdopbvh.h
@@ -40,6 +40,8 @@ extern "C" {
#endif
struct BVHTree;
+struct DistProjectedAABBPrecalc;
+
typedef struct BVHTree BVHTree;
#define USE_KDOPBVH_WATERTIGHT
@@ -101,6 +103,13 @@ typedef bool (*BVHTree_OverlapCallback)(void *userdata, int index_a, int index_b
/* callback to range search query */
typedef void (*BVHTree_RangeQuery)(void *userdata, int index, const float co[3], float dist_sq);
+/* callback to find nearest projected */
+typedef void (*BVHTree_NearestProjectedCallback)(
+ void *userdata, int index,
+ const struct DistProjectedAABBPrecalc *precalc,
+ const float (*clip_plane)[4], const int clip_plane_len,
+ BVHTreeNearest *nearest);
+
/* callbacks to BLI_bvhtree_walk_dfs */
/* return true to traverse into this nodes children, else skip. */
@@ -162,6 +171,12 @@ int BLI_bvhtree_range_query(
BVHTree *tree, const float co[3], float radius,
BVHTree_RangeQuery callback, void *userdata);
+int BLI_bvhtree_find_nearest_projected(
+ BVHTree *tree, float projmat[4][4], float winsize[2], float mval[2],
+ float clip_planes[6][4], int clip_num,
+ BVHTreeNearest *nearest,
+ BVHTree_NearestProjectedCallback callback, void *userdata);
+
void BLI_bvhtree_walk_dfs(
BVHTree *tree,
BVHTree_WalkParentCallback walk_parent_cb,