36 #define USE_KDOPBVH_WATERTIGHT
75 #ifdef USE_KDOPBVH_WATERTIGHT
104 #define BVH_RAYCAST_DEFAULT (BVH_RAYCAST_WATERTIGHT)
105 #define BVH_RAYCAST_DIST_MAX (FLT_MAX / 2.0f)
129 const float (*clip_plane)[4],
130 const int clip_plane_len,
154 BVHTree *
tree,
int index,
const float co[3],
const float co_moving[3],
int numpoints);
168 const uint max_interactions,
172 unsigned int *r_overlap_tot,
237 const float light_start[3],
238 const float light_end[3],
249 float clip_planes[6][4],
typedef float(TangentPoint)[2]
struct BVHTreeNearest BVHTreeNearest
int BLI_bvhtree_range_query(BVHTree *tree, const float co[3], float radius, BVHTree_RangeQuery callback, void *userdata)
@ BVH_NEAREST_OPTIMAL_ORDER
struct BVHTreeOverlap BVHTreeOverlap
int BLI_bvhtree_get_tree_type(const BVHTree *tree)
@ BVH_OVERLAP_USE_THREADING
@ BVH_OVERLAP_RETURN_PAIRS
void BLI_bvhtree_ray_cast_all_ex(BVHTree *tree, const float co[3], const float dir[3], float radius, float hit_dist, BVHTree_RayCastCallback callback, void *userdata, int flag)
int BLI_bvhtree_find_nearest_first(BVHTree *tree, const float co[3], const float dist_sq, BVHTree_NearestPointCallback callback, void *userdata)
BVHTreeOverlap * BLI_bvhtree_overlap_ex(const BVHTree *tree1, const BVHTree *tree2, uint *r_overlap_tot, BVHTree_OverlapCallback callback, void *userdata, const uint max_interactions, const int flag)
int BLI_bvhtree_find_nearest_ex(BVHTree *tree, const float co[3], BVHTreeNearest *nearest, BVHTree_NearestPointCallback callback, void *userdata, int flag)
const float bvhtree_kdop_axes[13][3]
int * BLI_bvhtree_intersect_plane(BVHTree *tree, float plane[4], uint *r_intersect_tot)
BVHTreeOverlap * BLI_bvhtree_overlap(const BVHTree *tree1, const BVHTree *tree2, unsigned int *r_overlap_tot, BVHTree_OverlapCallback callback, void *userdata)
void BLI_bvhtree_balance(BVHTree *tree)
BVHTree * BLI_bvhtree_new(int maxsize, float epsilon, char tree_type, char axis)
void BLI_bvhtree_update_tree(BVHTree *tree)
int BLI_bvhtree_ray_cast_ex(BVHTree *tree, const float co[3], const float dir[3], float radius, BVHTreeRayHit *hit, BVHTree_RayCastCallback callback, void *userdata, int flag)
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_plane_len, BVHTreeNearest *nearest, BVHTree_NearestProjectedCallback callback, void *userdata)
float BLI_bvhtree_bb_raycast(const float bv[6], const float light_start[3], const float light_end[3], float pos[3])
bool(* BVHTree_WalkLeafCallback)(const BVHTreeAxisRange *bounds, int index, void *userdata)
void BLI_bvhtree_free(BVHTree *tree)
bool(* BVHTree_WalkOrderCallback)(const BVHTreeAxisRange *bounds, char axis, void *userdata)
void(* BVHTree_RayCastCallback)(void *userdata, int index, const BVHTreeRay *ray, BVHTreeRayHit *hit)
void BLI_bvhtree_insert(BVHTree *tree, int index, const float co[3], int numpoints)
bool BLI_bvhtree_update_node(BVHTree *tree, int index, const float co[3], const float co_moving[3], int numpoints)
void BLI_bvhtree_walk_dfs(BVHTree *tree, BVHTree_WalkParentCallback walk_parent_cb, BVHTree_WalkLeafCallback walk_leaf_cb, BVHTree_WalkOrderCallback walk_order_cb, void *userdata)
int BLI_bvhtree_get_len(const BVHTree *tree)
bool(* BVHTree_WalkParentCallback)(const BVHTreeAxisRange *bounds, void *userdata)
void(* BVHTree_NearestProjectedCallback)(void *userdata, int index, const struct DistProjectedAABBPrecalc *precalc, const float(*clip_plane)[4], const int clip_plane_len, BVHTreeNearest *nearest)
int BLI_bvhtree_overlap_thread_num(const BVHTree *tree)
void(* BVHTree_NearestPointCallback)(void *userdata, int index, const float co[3], BVHTreeNearest *nearest)
bool(* BVHTree_OverlapCallback)(void *userdata, int index_a, int index_b, int thread)
struct BVHTreeAxisRange BVHTreeAxisRange
struct BVHTreeRayHit BVHTreeRayHit
float BLI_bvhtree_get_epsilon(const BVHTree *tree)
struct BVHTreeRay BVHTreeRay
void BLI_bvhtree_get_bounding_box(BVHTree *tree, float r_bb_min[3], float r_bb_max[3])
void BLI_bvhtree_ray_cast_all(BVHTree *tree, const float co[3], const float dir[3], float radius, float hit_dist, BVHTree_RayCastCallback callback, void *userdata)
int BLI_bvhtree_ray_cast(BVHTree *tree, const float co[3], const float dir[3], float radius, BVHTreeRayHit *hit, BVHTree_RayCastCallback callback, void *userdata)
void(* BVHTree_RangeQuery)(void *userdata, int index, const float co[3], float dist_sq)
int BLI_bvhtree_find_nearest(BVHTree *tree, const float co[3], BVHTreeNearest *nearest, BVHTree_NearestPointCallback callback, void *userdata)
static btDbvtVolume bounds(btDbvtNode **leaves, int count)
DEGForeachIDComponentCallback callback
struct IsectRayPrecalc * isect_precalc