Blender
V3.3
|
Go to the source code of this file.
Typedefs | |
typedef struct BMBVHTree | BMBVHTree |
typedef bool(* | BMBVHTree_FaceFilter) (struct BMFace *f, void *userdata) |
Enumerations | |
enum | { BMBVH_RETURN_ORIG = (1 << 0) , BMBVH_RESPECT_SELECT = (1 << 1) , BMBVH_RESPECT_HIDDEN = (1 << 2) } |
Functions | |
BMBVHTree * | BKE_bmbvh_new_from_editmesh (struct BMEditMesh *em, int flag, const float(*cos_cage)[3], bool cos_cage_free) |
BMBVHTree * | BKE_bmbvh_new_ex (struct BMesh *bm, struct BMLoop *(*looptris)[3], int looptris_tot, int flag, const float(*cos_cage)[3], bool cos_cage_free, bool(*test_fn)(struct BMFace *, void *user_data), void *user_data) |
BMBVHTree * | BKE_bmbvh_new (struct BMesh *bm, struct BMLoop *(*looptris)[3], int looptris_tot, int flag, const float(*cos_cage)[3], 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], 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], float radius, float *r_dist, float r_hitout[3], float r_cagehit[3], BMBVHTree_FaceFilter filter_cb, void *filter_userdata) |
struct BMVert * | BKE_bmbvh_find_vert_closest (BMBVHTree *tree, const float co[3], float dist_max) |
struct BMFace * | BKE_bmbvh_find_face_closest (BMBVHTree *tree, const float co[3], float dist_max) |
struct BVHTreeOverlap * | BKE_bmbvh_overlap (const BMBVHTree *bmtree_a, const BMBVHTree *bmtree_b, unsigned int *r_overlap_tot) |
struct BVHTreeOverlap * | BKE_bmbvh_overlap_self (const BMBVHTree *bmtree, unsigned int *r_overlap_tot) |
Definition at line 1 of file BKE_editmesh_bvh.h.
Definition at line 24 of file BKE_editmesh_bvh.h.
anonymous enum |
BKE_bmbvh_new flag parameter.
Definition at line 85 of file BKE_editmesh_bvh.h.
Definition at line 484 of file editmesh_bvh.c.
References BLI_assert, BLI_bvhtree_find_nearest(), BMBVHTree::bm, BM_VERT, bmbvh_find_face_closest_cb(), BMBVHTree::cos_cage, FaceSearchUserData::cos_cage, FaceSearchUserData::dist_max_sq, BVHTreeNearest::dist_sq, BMesh::elem_index_dirty, BMLoop::f, float(), BVHTreeNearest::index, BMBVHTree::looptris, FaceSearchUserData::looptris, NULL, and BMBVHTree::tree.
Referenced by edbm_face_split_by_edges_exec().
Find a vert closest to co in a sphere of radius dist_max.
Definition at line 425 of file editmesh_bvh.c.
References BLI_assert, BLI_bvhtree_find_nearest(), BMBVHTree::bm, BM_VERT, bmbvh_find_vert_closest_cb(), BMBVHTree::cos_cage, VertSearchUserData::cos_cage, VertSearchUserData::dist_max_sq, BVHTreeNearest::dist_sq, BMesh::elem_index_dirty, float(), BVHTreeNearest::index, VertSearchUserData::index_tri, BMBVHTree::looptris, VertSearchUserData::looptris, NULL, BMBVHTree::tree, and BMLoop::v.
Definition at line 170 of file editmesh_bvh.c.
References BLI_bvhtree_free(), BMBVHTree::cos_cage, BMBVHTree::cos_cage_free, MEM_freeN, and BMBVHTree::tree.
Referenced by calcEdgeSlide_mval_range(), edbm_face_split_by_edges_exec(), blender::draw::statvis_calc_intersect(), and blender::draw::statvis_calc_thickness().
BMBVHTree* BKE_bmbvh_new | ( | struct BMesh * | bm, |
struct BMLoop *(*) | looptris[3], | ||
int | looptris_tot, | ||
int | flag, | ||
const float(*) | cos_cage[3], | ||
bool | cos_cage_free | ||
) |
Definition at line 145 of file editmesh_bvh.c.
References BKE_bmbvh_new_ex(), bm, bm_face_is_not_hidden(), bm_face_is_select(), BMBVH_RESPECT_HIDDEN, BMBVH_RESPECT_SELECT, bool, NULL, and user_data.
Referenced by BKE_bmbvh_new_from_editmesh(), and edbm_face_split_by_edges_exec().
BMBVHTree* BKE_bmbvh_new_ex | ( | struct BMesh * | bm, |
struct BMLoop *(*) | looptris[3], | ||
int | looptris_tot, | ||
int | flag, | ||
const float(*) | cos_cage[3], | ||
bool | cos_cage_free, | ||
bool(*)(struct BMFace *, void *user_data) | test_fn, | ||
void * | user_data | ||
) |
BMBVHTree* BKE_bmbvh_new_from_editmesh | ( | struct BMEditMesh * | em, |
int | flag, | ||
const float(*) | cos_cage[3], | ||
bool | cos_cage_free | ||
) |
Definition at line 31 of file editmesh_bvh.c.
References BKE_bmbvh_new(), BMEditMesh::bm, BMEditMesh::looptris, and BMEditMesh::tottri.
Referenced by calcEdgeSlide_mval_range(), blender::draw::statvis_calc_intersect(), and blender::draw::statvis_calc_thickness().
struct BVHTreeOverlap* BKE_bmbvh_overlap | ( | const BMBVHTree * | bmtree_a, |
const BMBVHTree * | bmtree_b, | ||
unsigned int * | r_overlap_tot | ||
) |
Overlap indices reference the looptri's.
Definition at line 552 of file editmesh_bvh.c.
References BLI_bvhtree_get_epsilon(), BLI_bvhtree_overlap(), bmbvh_overlap_cb(), data, max_ff(), and BMBVHTree::tree.
struct BVHTreeOverlap* BKE_bmbvh_overlap_self | ( | const BMBVHTree * | bmtree, |
unsigned int * | r_overlap_tot | ||
) |
Overlap indices reference the looptri's.
Definition at line 575 of file editmesh_bvh.c.
References BLI_bvhtree_get_epsilon(), BLI_bvhtree_overlap(), bmbvh_overlap_self_cb(), data, and BMBVHTree::tree.
Referenced by blender::draw::statvis_calc_intersect().
struct BMFace* BKE_bmbvh_ray_cast | ( | BMBVHTree * | tree, |
const float | co[3], | ||
const float | dir[3], | ||
float | radius, | ||
float * | r_dist, | ||
float | r_hitout[3], | ||
float | r_cagehit[3] | ||
) |
Definition at line 290 of file editmesh_bvh.c.
References BLI_assert, BLI_bvhtree_ray_cast(), BMBVHTree::bm, BM_VERT, bmbvh_ray_cast_cb(), bmbvh_ray_cast_handle_hit(), BMBVHTree::cos_cage, RayCastUserData::cos_cage, BVHTreeRayHit::dist, BMesh::elem_index_dirty, float(), BVHTreeRayHit::index, BMBVHTree::looptris, RayCastUserData::looptris, NULL, and BMBVHTree::tree.
Referenced by edge_ray_cast(), and blender::draw::statvis_calc_thickness().
struct BMFace* BKE_bmbvh_ray_cast_filter | ( | BMBVHTree * | tree, |
const float | co[3], | ||
const float | dir[3], | ||
float | radius, | ||
float * | r_dist, | ||
float | r_hitout[3], | ||
float | r_cagehit[3], | ||
BMBVHTree_FaceFilter | filter_cb, | ||
void * | filter_userdata | ||
) |
Definition at line 348 of file editmesh_bvh.c.
References BLI_assert, BLI_bvhtree_ray_cast(), BMBVHTree::bm, BM_VERT, bmbvh_ray_cast_cb_filter(), bmbvh_ray_cast_handle_hit(), RayCastUserData_Filter::bmcb_data, BMBVHTree::cos_cage, RayCastUserData::cos_cage, BVHTreeRayHit::dist, BMesh::elem_index_dirty, RayCastUserData_Filter::filter_cb, RayCastUserData_Filter::filter_userdata, float(), BVHTreeRayHit::index, BMBVHTree::looptris, RayCastUserData::looptris, NULL, and BMBVHTree::tree.
Definition at line 181 of file editmesh_bvh.c.
References BMBVHTree::tree.