diff options
Diffstat (limited to 'source/blender/blenkernel/BKE_editmesh_bvh.h')
-rw-r--r-- | source/blender/blenkernel/BKE_editmesh_bvh.h | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/source/blender/blenkernel/BKE_editmesh_bvh.h b/source/blender/blenkernel/BKE_editmesh_bvh.h index 168f700d132..3ee7dcd94b8 100644 --- a/source/blender/blenkernel/BKE_editmesh_bvh.h +++ b/source/blender/blenkernel/BKE_editmesh_bvh.h @@ -43,6 +43,8 @@ struct Scene; typedef struct BMBVHTree BMBVHTree; +typedef bool (*BMBVHTree_FaceFilter)(struct BMFace *f, void *userdata); + BMBVHTree *BKE_bmbvh_new_from_editmesh( struct BMEditMesh *em, int flag, const float (*cos_cage)[3], const bool cos_cage_free); @@ -55,8 +57,16 @@ BMBVHTree *BKE_bmbvh_new( const float (*cos_cage)[3], const bool cos_cage_free); void BKE_bmbvh_free(BMBVHTree *tree); struct BVHTree *BKE_bmbvh_tree_get(BMBVHTree *tree); -struct BMFace *BKE_bmbvh_ray_cast(BMBVHTree *tree, const float co[3], const float dir[3], const float radius, - float *r_dist, float r_hitout[3], float r_cagehit[3]); + +struct BMFace *BKE_bmbvh_ray_cast( + BMBVHTree *tree, const float co[3], const float dir[3], const float radius, + float *r_dist, float r_hitout[3], float r_cagehit[3]); + +struct BMFace *BKE_bmbvh_ray_cast_filter( + BMBVHTree *tree, const float co[3], const float dir[3], const float radius, + float *r_dist, float r_hitout[3], float r_cagehit[3], + BMBVHTree_FaceFilter filter, void *filter_cb); + /* find a face intersecting a segment (but not apart of the segment) */ struct BMFace *BKE_bmbvh_find_face_segment(BMBVHTree *tree, const float co_a[3], const float co_b[3], float *r_fac, float r_hitout[3], float r_cagehit[3]); |