Blender V4.3
BKE_editmesh_bvh.hh File Reference
#include "BLI_math_vector_types.hh"
#include "BLI_span.hh"

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 blender::float3 *cos_cage, bool cos_cage_free)
 
BMBVHTreeBKE_bmbvh_new_ex (struct BMesh *bm, blender::Span< std::array< BMLoop *, 3 > > looptris, int flag, const blender::float3 *cos_cage, bool cos_cage_free, bool(*test_fn)(struct BMFace *, void *user_data), void *user_data)
 
BMBVHTreeBKE_bmbvh_new (struct BMesh *bm, blender::Span< std::array< BMLoop *, 3 > > looptris, int flag, const blender::float3 *cos_cage, bool cos_cage_free)
 
void BKE_bmbvh_free (BMBVHTree *tree)
 
struct BVHTreeBKE_bmbvh_tree_get (BMBVHTree *tree)
 
struct BMFaceBKE_bmbvh_ray_cast (const 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 (const 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 (const BMBVHTree *tree, const float co[3], float dist_max)
 
struct BMFaceBKE_bmbvh_find_face_closest (const 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 22 of file BKE_editmesh_bvh.hh.

◆ BMBVHTree_FaceFilter

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

Definition at line 24 of file BKE_editmesh_bvh.hh.

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 87 of file BKE_editmesh_bvh.hh.

Function Documentation

◆ BKE_bmbvh_find_face_closest()

◆ BKE_bmbvh_find_vert_closest()

◆ BKE_bmbvh_free()

◆ BKE_bmbvh_new()

BMBVHTree * BKE_bmbvh_new ( struct BMesh * bm,
blender::Span< std::array< BMLoop *, 3 > > looptris,
int flag,
const blender::float3 * cos_cage,
bool cos_cage_free )

◆ BKE_bmbvh_new_ex()

BMBVHTree * BKE_bmbvh_new_ex ( struct BMesh * bm,
blender::Span< std::array< BMLoop *, 3 > > looptris,
int flag,
const blender::float3 * cos_cage,
bool cos_cage_free,
bool(* test_fn )(struct BMFace *, void *user_data),
void * user_data )

◆ BKE_bmbvh_new_from_editmesh()

BMBVHTree * BKE_bmbvh_new_from_editmesh ( struct BMEditMesh * em,
int flag,
const blender::float3 * cos_cage,
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 looptris.

Definition at line 553 of file editmesh_bvh.cc.

References BLI_bvhtree_get_epsilon(), BLI_bvhtree_overlap(), bmbvh_overlap_cb(), data, max_ff(), BMBVHTree::tree, and BMBVHTree_OverlapData::tree_pair.

◆ BKE_bmbvh_overlap_self()

struct BVHTreeOverlap * BKE_bmbvh_overlap_self ( const BMBVHTree * bmtree,
unsigned int * r_overlap_tot )

◆ BKE_bmbvh_ray_cast()

◆ BKE_bmbvh_ray_cast_filter()

◆ BKE_bmbvh_tree_get()

struct BVHTree * BKE_bmbvh_tree_get ( BMBVHTree * tree)

Definition at line 180 of file editmesh_bvh.cc.

References BMBVHTree::tree.