Blender  V3.3
Typedefs | Enumerations | Functions
BKE_editmesh_bvh.h File Reference

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

BMBVHTreeBKE_bmbvh_new_from_editmesh (struct BMEditMesh *em, int flag, const float(*cos_cage)[3], bool cos_cage_free)
 
BMBVHTreeBKE_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)
 
BMBVHTreeBKE_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 BVHTreeBKE_bmbvh_tree_get (BMBVHTree *tree)
 
struct BMFaceBKE_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 BMFaceBKE_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 BMVertBKE_bmbvh_find_vert_closest (BMBVHTree *tree, const float co[3], float dist_max)
 
struct BMFaceBKE_bmbvh_find_face_closest (BMBVHTree *tree, const float co[3], float dist_max)
 
struct BVHTreeOverlapBKE_bmbvh_overlap (const BMBVHTree *bmtree_a, const BMBVHTree *bmtree_b, unsigned int *r_overlap_tot)
 
struct BVHTreeOverlapBKE_bmbvh_overlap_self (const BMBVHTree *bmtree, unsigned int *r_overlap_tot)
 

Typedef Documentation

◆ BMBVHTree

typedef struct BMBVHTree BMBVHTree

Definition at line 1 of file BKE_editmesh_bvh.h.

◆ BMBVHTree_FaceFilter

typedef bool(* BMBVHTree_FaceFilter) (struct BMFace *f, void *userdata)

Definition at line 24 of file BKE_editmesh_bvh.h.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

BKE_bmbvh_new flag parameter.

Enumerator
BMBVH_RETURN_ORIG 

Use with 'cos_cage', returns hits in relation to original geometry.

BMBVH_RESPECT_SELECT 

Restrict to hidden geometry (overrides BMBVH_RESPECT_HIDDEN).

BMBVH_RESPECT_HIDDEN 

Omit hidden geometry.

Definition at line 85 of file BKE_editmesh_bvh.h.

Function Documentation

◆ BKE_bmbvh_find_face_closest()

struct BMFace* BKE_bmbvh_find_face_closest ( BMBVHTree tree,
const float  co[3],
float  dist_max 
)

◆ BKE_bmbvh_find_vert_closest()

struct BMVert* BKE_bmbvh_find_vert_closest ( BMBVHTree tree,
const float  co[3],
float  dist_max 
)

◆ BKE_bmbvh_free()

void BKE_bmbvh_free ( BMBVHTree tree)

◆ BKE_bmbvh_new()

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 
)

◆ BKE_bmbvh_new_ex()

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 
)

◆ BKE_bmbvh_new_from_editmesh()

BMBVHTree* BKE_bmbvh_new_from_editmesh ( struct BMEditMesh em,
int  flag,
const float(*)  cos_cage[3],
bool  cos_cage_free 
)

◆ BKE_bmbvh_overlap()

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.

◆ BKE_bmbvh_overlap_self()

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().

◆ BKE_bmbvh_ray_cast()

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] 
)

◆ BKE_bmbvh_ray_cast_filter()

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 
)

◆ BKE_bmbvh_tree_get()

struct BVHTree* BKE_bmbvh_tree_get ( BMBVHTree tree)

Definition at line 181 of file editmesh_bvh.c.

References BMBVHTree::tree.