|
Blender
V2.59
|
#include <assert.h>#include "MEM_guardedalloc.h"#include "BLI_utildefines.h"#include "BLI_kdopbvh.h"#include "BLI_math.h"Go to the source code of this file.
Classes | |
| struct | BVHNode |
| struct | BVHTree |
| struct | BVHOverlapData |
| struct | BVHNearestData |
| struct | BVHRayCastData |
| struct | BVHBuildHelper |
| struct | NodeDistance |
| struct | RangeQueryData |
Defines | |
| #define | MAX_TREETYPE 32 |
| #define | DEFAULT_FIND_NEAREST_HEAP_SIZE 1024 |
| #define | PUSH_HEAP_BODY(HEAP_TYPE, PRIORITY, heap, heap_size) |
| #define | POP_HEAP_BODY(HEAP_TYPE, PRIORITY, heap, heap_size) |
| #define | NodeDistance_priority(a, b) ( (a).dist < (b).dist ) |
Typedefs | |
| typedef struct BVHNode | BVHNode |
| typedef struct BVHOverlapData | BVHOverlapData |
| typedef struct BVHNearestData | BVHNearestData |
| typedef struct BVHRayCastData | BVHRayCastData |
| typedef struct BVHBuildHelper | BVHBuildHelper |
| typedef struct NodeDistance | NodeDistance |
| typedef struct RangeQueryData | RangeQueryData |
Functions | |
| static void | bvh_insertionsort (BVHNode **a, int lo, int hi, int axis) |
| static int | bvh_partition (BVHNode **a, int lo, int hi, BVHNode *x, int axis) |
| static BVHNode * | bvh_medianof3 (BVHNode **a, int lo, int mid, int hi, int axis) |
| static int | partition_nth_element (BVHNode **a, int _begin, int _end, int n, int axis) |
| static void | build_skip_links (BVHTree *tree, BVHNode *node, BVHNode *left, BVHNode *right) |
| static void | create_kdop_hull (BVHTree *tree, BVHNode *node, float *co, int numpoints, int moving) |
| static void | refit_kdop_hull (BVHTree *tree, BVHNode *node, int start, int end) |
| static char | get_largest_axis (float *bv) |
| static void | node_join (BVHTree *tree, BVHNode *node) |
| static void | build_implicit_tree_helper (BVHTree *tree, BVHBuildHelper *data) |
| static int | implicit_leafs_index (BVHBuildHelper *data, int depth, int child_index) |
| static int | implicit_needed_branches (int tree_type, int leafs) |
| static void | split_leafs (BVHNode **leafs_array, int *nth, int partitions, int split_axis) |
| static void | non_recursive_bvh_div_nodes (BVHTree *tree, BVHNode *branches_array, BVHNode **leafs_array, int num_leafs) |
| BVHTree * | BLI_bvhtree_new (int maxsize, float epsilon, char tree_type, char axis) |
| void | BLI_bvhtree_free (BVHTree *tree) |
| void | BLI_bvhtree_balance (BVHTree *tree) |
| int | BLI_bvhtree_insert (BVHTree *tree, int index, float *co, int numpoints) |
| int | BLI_bvhtree_update_node (BVHTree *tree, int index, float *co, float *co_moving, int numpoints) |
| void | BLI_bvhtree_update_tree (BVHTree *tree) |
| float | BLI_bvhtree_getepsilon (BVHTree *tree) |
| static int | tree_overlap (BVHNode *node1, BVHNode *node2, int start_axis, int stop_axis) |
| static void | traverse (BVHOverlapData *data, BVHNode *node1, BVHNode *node2) |
| BVHTreeOverlap * | BLI_bvhtree_overlap (BVHTree *tree1, BVHTree *tree2, unsigned int *result) |
| static float | squared_dist (const float *a, const float *b) |
| static float | calc_nearest_point (const float *proj, BVHNode *node, float *nearest) |
| static void | dfs_find_nearest_dfs (BVHNearestData *data, BVHNode *node) |
| static void | dfs_find_nearest_begin (BVHNearestData *data, BVHNode *node) |
| int | BLI_bvhtree_find_nearest (BVHTree *tree, const float *co, BVHTreeNearest *nearest, BVHTree_NearestPointCallback callback, void *userdata) |
| static float | ray_nearest_hit (BVHRayCastData *data, float *bv) |
| static float | fast_ray_nearest_hit (const BVHRayCastData *data, const BVHNode *node) |
| static void | dfs_raycast (BVHRayCastData *data, BVHNode *node) |
| int | BLI_bvhtree_ray_cast (BVHTree *tree, const float *co, const float *dir, float radius, BVHTreeRayHit *hit, BVHTree_RayCastCallback callback, void *userdata) |
| float | BLI_bvhtree_bb_raycast (float *bv, float *light_start, float *light_end, float *pos) |
| static void | dfs_range_query (RangeQueryData *data, BVHNode *node) |
| int | BLI_bvhtree_range_query (BVHTree *tree, const float *co, float radius, BVHTree_RangeQuery callback, void *userdata) |
Variables | |
| static float | KDOP_AXES [13][3] |
Definition in file BLI_kdopbvh.c.
| #define DEFAULT_FIND_NEAREST_HEAP_SIZE 1024 |
Definition at line 52 of file BLI_kdopbvh.c.
| #define MAX_TREETYPE 32 |
Definition at line 51 of file BLI_kdopbvh.c.
Referenced by BLI_bvhtree_new(), and non_recursive_bvh_div_nodes().
| #define NodeDistance_priority | ( | a, | |
| b | |||
| ) | ( (a).dist < (b).dist ) |
Definition at line 1254 of file BLI_kdopbvh.c.
| #define POP_HEAP_BODY | ( | HEAP_TYPE, | |
| PRIORITY, | |||
| heap, | |||
| heap_size | |||
| ) |
{ \
HEAP_TYPE element = heap[heap_size-1]; \
int parent = 0; \
while(parent < (heap_size-1)/2 ) \
{ \
int child2 = (parent+1)*2; \
if(PRIORITY(heap[child2-1], heap[child2])) \
--child2; \
\
if(PRIORITY(element, heap[child2])) \
break; \
\
heap[parent] = heap[child2]; \
parent = child2; \
} \
heap[parent] = element; \
}
Definition at line 150 of file BLI_kdopbvh.c.
| #define PUSH_HEAP_BODY | ( | HEAP_TYPE, | |
| PRIORITY, | |||
| heap, | |||
| heap_size | |||
| ) |
{ \
HEAP_TYPE element = heap[heap_size-1]; \
int child = heap_size-1; \
while(child != 0) \
{ \
int parent = (child-1) / 2; \
if(PRIORITY(element, heap[parent])) \
{ \
heap[child] = heap[parent]; \
child = parent; \
} \
else break; \
} \
heap[child] = element; \
}
Definition at line 133 of file BLI_kdopbvh.c.
| typedef struct BVHBuildHelper BVHBuildHelper |
| typedef struct BVHNearestData BVHNearestData |
| typedef struct BVHOverlapData BVHOverlapData |
| typedef struct BVHRayCastData BVHRayCastData |
| typedef struct NodeDistance NodeDistance |
| typedef struct RangeQueryData RangeQueryData |
| void BLI_bvhtree_balance | ( | BVHTree * | tree | ) |
Definition at line 953 of file BLI_kdopbvh.c.
References assert, build_skip_links(), i, implicit_needed_branches(), BVHTree::nodearray, BVHTree::nodes, non_recursive_bvh_div_nodes(), NULL, BVHTree::totbranch, BVHTree::totleaf, and BVHTree::tree_type.
Referenced by bvhselftree_build_from_cloth(), bvhtree_build_from_cloth(), bvhtree_build_from_mvert(), bvhtree_from_mesh_edges(), bvhtree_from_mesh_faces(), bvhtree_from_mesh_verts(), heat_ray_tree_create(), pointdensity_cache_object(), pointdensity_cache_psys(), psys_update_particle_bvhtree(), and RE_rayobject_blibvh_done().
| float BLI_bvhtree_bb_raycast | ( | float * | bv, |
| float * | light_start, | ||
| float * | light_end, | ||
| float * | pos | ||
| ) |
Definition at line 1634 of file BLI_kdopbvh.c.
References BVHTreeRay::direction, BVHTreeRayHit::dist, FLT_MAX, BVHRayCastData::hit, normalize_v3(), BVHTreeRay::origin, BVHTreeRay::radius, BVHRayCastData::ray, BVHRayCastData::ray_dot_axis, ray_nearest_hit(), VECADDFAC, and VECCOPY.
| int BLI_bvhtree_find_nearest | ( | BVHTree * | tree, |
| const float * | co, | ||
| BVHTreeNearest * | nearest, | ||
| BVHTree_NearestPointCallback | callback, | ||
| void * | userdata | ||
| ) |
Definition at line 1391 of file BLI_kdopbvh.c.
References BVHNearestData::callback, BVHNearestData::co, co, dfs_find_nearest_begin(), BVHTreeNearest::dist, FLT_MAX, i, BVHTreeNearest::index, INPR, KDOP_AXES, BVHNearestData::nearest, BVHTree::nodes, BVHNearestData::proj, MakeCursor::root, BVHTree::start_axis, BVHTree::stop_axis, BVHTree::totleaf, BVHNearestData::tree, and BVHNearestData::userdata.
Referenced by closest_point_on_surface(), connect_hair(), shrinkwrap_calc_nearest_surface_point(), shrinkwrap_calc_nearest_vertex(), and shrinkwrap_get_tarmat().
| void BLI_bvhtree_free | ( | BVHTree * | tree | ) |
Definition at line 941 of file BLI_kdopbvh.c.
References MEM_freeN(), BVHTree::nodearray, BVHTree::nodebv, BVHTree::nodechild, and BVHTree::nodes.
Referenced by BKE_free_pointdensitydata(), bvhcacheitem_free(), cache_pointdensity(), cloth_free_modifier(), cloth_free_modifier_extern(), deformVerts(), free_bvhtree_from_mesh(), free_pointdensity(), freeData(), heat_system_free(), psys_free(), psys_update_particle_bvhtree(), RE_rayobject_blibvh_free(), smokeModifier_freeCollision(), and smokeModifier_reset().
| float BLI_bvhtree_getepsilon | ( | BVHTree * | tree | ) |
Definition at line 1048 of file BLI_kdopbvh.c.
References BVHTree::epsilon.
Referenced by cloth_collision(), cloth_collision_response_static(), and deformVerts().
| int BLI_bvhtree_insert | ( | BVHTree * | tree, |
| int | index, | ||
| float * | co, | ||
| int | numpoints | ||
| ) |
Definition at line 976 of file BLI_kdopbvh.c.
References BVHNode::bv, create_kdop_hull(), BVHTree::epsilon, i, BVHNode::index, MEM_allocN_len(), BVHTree::nodearray, BVHTree::nodes, NULL, BVHTree::start_axis, BVHTree::totbranch, and BVHTree::totleaf.
Referenced by bvhselftree_build_from_cloth(), bvhtree_build_from_cloth(), bvhtree_build_from_mvert(), bvhtree_from_mesh_edges(), bvhtree_from_mesh_faces(), bvhtree_from_mesh_verts(), heat_ray_tree_create(), pointdensity_cache_object(), pointdensity_cache_psys(), psys_update_particle_bvhtree(), and RE_rayobject_blibvh_add().
| BVHTree* BLI_bvhtree_new | ( | int | maxsize, |
| float | epsilon, | ||
| char | tree_type, | ||
| char | axis | ||
| ) |
Definition at line 835 of file BLI_kdopbvh.c.
References BVHTree::axis, BVHNode::bv, BVHNode::children, KDL::epsilon, BVHTree::epsilon, i, implicit_needed_branches(), MAX2, MAX_TREETYPE, MEM_callocN(), MEM_freeN(), BVHTree::nodearray, BVHTree::nodebv, BVHTree::nodechild, BVHTree::nodes, NULL, BVHTree::start_axis, BVHTree::stop_axis, and BVHTree::tree_type.
Referenced by bvhselftree_build_from_cloth(), bvhtree_build_from_cloth(), bvhtree_build_from_mvert(), bvhtree_from_mesh_edges(), bvhtree_from_mesh_faces(), bvhtree_from_mesh_verts(), heat_ray_tree_create(), pointdensity_cache_object(), pointdensity_cache_psys(), psys_update_particle_bvhtree(), and RE_rayobject_blibvh_create().
| BVHTreeOverlap* BLI_bvhtree_overlap | ( | BVHTree * | tree1, |
| BVHTree * | tree2, | ||
| unsigned int * | result | ||
| ) |
Definition at line 1137 of file BLI_kdopbvh.c.
References BVHTree::axis, BVHNode::children, BVHOverlapData::i, MAX2, BVHOverlapData::max_overlap, MEM_callocN(), MEM_freeN(), MIN2, BVHTree::nodes, NULL, BVHOverlapData::overlap, BVHTree::start_axis, BVHOverlapData::start_axis, BVHTree::stop_axis, BVHOverlapData::stop_axis, BVHTree::totleaf, BVHNode::totnode, traverse(), BVHOverlapData::tree1, BVHOverlapData::tree2, tree_overlap(), and BVHTree::tree_type.
Referenced by cloth_bvh_objcollision().
| int BLI_bvhtree_range_query | ( | BVHTree * | tree, |
| const float * | co, | ||
| float | radius, | ||
| BVHTree_RangeQuery | callback, | ||
| void * | userdata | ||
| ) |
Definition at line 1720 of file BLI_kdopbvh.c.
References calc_nearest_point(), RangeQueryData::callback, RangeQueryData::center, co, dfs_range_query(), RangeQueryData::hits, BVHNode::index, BVHTree::nodes, NULL, RangeQueryData::radius, MakeCursor::root, BVHTree::totleaf, BVHNode::totnode, RangeQueryData::tree, and RangeQueryData::userdata.
Referenced by pointdensitytex(), and sph_force_cb().
| int BLI_bvhtree_ray_cast | ( | BVHTree * | tree, |
| const float * | co, | ||
| const float * | dir, | ||
| float | radius, | ||
| BVHTreeRayHit * | hit, | ||
| BVHTree_RayCastCallback | callback, | ||
| void * | userdata | ||
| ) |
Definition at line 1580 of file BLI_kdopbvh.c.
References BVHRayCastData::callback, dfs_raycast(), BVHTreeRay::direction, BVHTreeRayHit::dist, fabs(), FLT_MAX, BVHRayCastData::hit, i, BVHRayCastData::idot_axis, BVHTreeRayHit::index, BVHRayCastData::index, INPR, KDOP_AXES, BVHTree::nodes, normalize_v3(), BVHTreeRay::origin, BVHTreeRay::radius, BVHRayCastData::ray, BVHRayCastData::ray_dot_axis, MakeCursor::root, BVHTree::totleaf, BVHRayCastData::tree, BVHRayCastData::userdata, and VECCOPY.
Referenced by boid_find_ground(), collision_detect(), eff_calc_visibility(), heat_ray_source_visible(), normal_projection_project_vertex(), RE_rayobject_blibvh_intersect(), rule_avoid_collision(), and snapDerivedMesh().
| int BLI_bvhtree_update_node | ( | BVHTree * | tree, |
| int | index, | ||
| float * | co, | ||
| float * | co_moving, | ||
| int | numpoints | ||
| ) |
Definition at line 1008 of file BLI_kdopbvh.c.
References BVHNode::bv, create_kdop_hull(), BVHTree::epsilon, i, BVHTree::nodearray, NULL, BVHTree::start_axis, and BVHTree::totleaf.
Referenced by bvhselftree_update_from_cloth(), bvhtree_update_from_cloth(), and bvhtree_update_from_mvert().
| void BLI_bvhtree_update_tree | ( | BVHTree * | tree | ) |
Definition at line 1035 of file BLI_kdopbvh.c.
References node_join(), BVHTree::nodes, MakeCursor::root, BVHTree::totbranch, and BVHTree::totleaf.
Referenced by bvhselftree_update_from_cloth(), bvhtree_update_from_cloth(), and bvhtree_update_from_mvert().
| static void build_implicit_tree_helper | ( | BVHTree * | tree, |
| BVHBuildHelper * | data | ||
| ) | [static] |
Definition at line 610 of file BLI_kdopbvh.c.
References BVHBuildHelper::branches_on_level, BVHBuildHelper::leafs_per_child, BVHBuildHelper::remain_leafs, BVHTree::totleaf, BVHBuildHelper::totleafs, BVHTree::tree_type, and BVHBuildHelper::tree_type.
Referenced by non_recursive_bvh_div_nodes().
| static void build_skip_links | ( | BVHTree * | tree, |
| BVHNode * | node, | ||
| BVHNode * | left, | ||
| BVHNode * | right | ||
| ) | [static] |
Definition at line 369 of file BLI_kdopbvh.c.
References BVHNode::children, i, left, BVHNode::skip, and BVHNode::totnode.
Referenced by BLI_bvhtree_balance().
| static void bvh_insertionsort | ( | BVHNode ** | a, |
| int | lo, | ||
| int | hi, | ||
| int | axis | ||
| ) | [static] |
Definition at line 215 of file BLI_kdopbvh.c.
References BVHNode::bv, and i.
Referenced by partition_nth_element().
Definition at line 284 of file BLI_kdopbvh.c.
Referenced by partition_nth_element().
Definition at line 232 of file BLI_kdopbvh.c.
References BVHNode::bv, i, and SWAP.
Referenced by partition_nth_element().
| static float calc_nearest_point | ( | const float * | proj, |
| BVHNode * | node, | ||
| float * | nearest | ||
| ) | [static] |
Definition at line 1208 of file BLI_kdopbvh.c.
References BVHNode::bv, i, and squared_dist().
Referenced by BLI_bvhtree_range_query(), dfs_find_nearest_begin(), dfs_find_nearest_dfs(), and dfs_range_query().
| static void create_kdop_hull | ( | BVHTree * | tree, |
| BVHNode * | node, | ||
| float * | co, | ||
| int | numpoints, | ||
| int | moving | ||
| ) | [static] |
Definition at line 390 of file BLI_kdopbvh.c.
References BVHNode::bv, FLT_MAX, i, INPR, KDOP_AXES, and BVHTree::start_axis.
Referenced by BLI_bvhtree_insert(), and BLI_bvhtree_update_node().
| static void dfs_find_nearest_begin | ( | BVHNearestData * | data, |
| BVHNode * | node | ||
| ) | [static] |
Definition at line 1295 of file BLI_kdopbvh.c.
References calc_nearest_point(), dfs_find_nearest_dfs(), BVHTreeNearest::dist, BVHNearestData::nearest, and BVHNearestData::proj.
Referenced by BLI_bvhtree_find_nearest().
| static void dfs_find_nearest_dfs | ( | BVHNearestData * | data, |
| BVHNode * | node | ||
| ) | [static] |
Definition at line 1257 of file BLI_kdopbvh.c.
References BVHNode::bv, calc_nearest_point(), BVHNearestData::callback, BVHNode::children, BVHTreeNearest::co, BVHNearestData::co, BVHTreeNearest::dist, i, BVHTreeNearest::index, BVHNode::index, BVHNode::main_axis, BVHNearestData::nearest, BVHNearestData::proj, BVHNode::totnode, and BVHNearestData::userdata.
Referenced by dfs_find_nearest_begin().
| static void dfs_range_query | ( | RangeQueryData * | data, |
| BVHNode * | node | ||
| ) | [static] |
Definition at line 1686 of file BLI_kdopbvh.c.
References BVHNode::bv, calc_nearest_point(), RangeQueryData::callback, RangeQueryData::center, BVHNode::children, co, RangeQueryData::hits, i, BVHNode::index, BVHNode::totnode, and RangeQueryData::userdata.
Referenced by BLI_bvhtree_range_query().
| static void dfs_raycast | ( | BVHRayCastData * | data, |
| BVHNode * | node | ||
| ) | [static] |
Definition at line 1506 of file BLI_kdopbvh.c.
References BVHNode::bv, BVHRayCastData::callback, BVHNode::children, BVHTreeRayHit::co, BVHTreeRay::direction, BVHTreeRayHit::dist, fast_ray_nearest_hit(), BVHRayCastData::hit, i, BVHNode::index, BVHTreeRayHit::index, BVHNode::main_axis, BVHTreeRay::origin, BVHTreeRay::radius, BVHRayCastData::ray, BVHRayCastData::ray_dot_axis, ray_nearest_hit(), BVHNode::totnode, BVHRayCastData::userdata, and VECADDFAC.
Referenced by BLI_bvhtree_ray_cast().
| static float fast_ray_nearest_hit | ( | const BVHRayCastData * | data, |
| const BVHNode * | node | ||
| ) | [static] |
Definition at line 1484 of file BLI_kdopbvh.c.
References BVHNode::bv, BVHTreeRayHit::dist, FLT_MAX, BVHRayCastData::hit, BVHRayCastData::idot_axis, BVHRayCastData::index, BVHTreeRay::origin, and BVHRayCastData::ray.
Referenced by dfs_raycast().
| static char get_largest_axis | ( | float * | bv | ) | [static] |
Definition at line 453 of file BLI_kdopbvh.c.
Referenced by non_recursive_bvh_div_nodes().
| static int implicit_leafs_index | ( | BVHBuildHelper * | data, |
| int | depth, | ||
| int | child_index | ||
| ) | [static] |
Definition at line 641 of file BLI_kdopbvh.c.
References BVHBuildHelper::branches_on_level, BVHBuildHelper::leafs_per_child, BVHBuildHelper::remain_leafs, and BVHBuildHelper::totleafs.
Referenced by non_recursive_bvh_div_nodes().
| static int implicit_needed_branches | ( | int | tree_type, |
| int | leafs | ||
| ) | [static] |
Generalized implicit tree build
An implicit tree is a tree where its structure is implied, thus there is no need to store child pointers or indexs. Its possible to find the position of the child or the parent with simple maths (multiplication and adittion). This type of tree is for example used on heaps.. where node N has its childs at indexs N*2 and N*2+1.
Altought in this case the tree type is general.. and not know until runtime. tree_type stands for the maximum number of childs that a tree node can have. All tree types >= 2 are supported.
Advantages of the used trees include:
Some math relations derived for general implicit trees:
K = tree_type, ( 2 <= K ) ROOT = 1 N child of node A = A * K + (2 - K) + N, (0 <= N < K)
Util methods: TODO... (looping elements, knowing if its a leaf or not.. etc...)
Definition at line 681 of file BLI_kdopbvh.c.
References MAX2.
Referenced by BLI_bvhtree_balance(), BLI_bvhtree_new(), and non_recursive_bvh_div_nodes().
Definition at line 478 of file BLI_kdopbvh.c.
References BVHNode::bv, BVHNode::children, FLT_MAX, i, BVHTree::start_axis, and BVHTree::tree_type.
Referenced by BLI_bvhtree_update_tree().
| static void non_recursive_bvh_div_nodes | ( | BVHTree * | tree, |
| BVHNode * | branches_array, | ||
| BVHNode ** | leafs_array, | ||
| int | num_leafs | ||
| ) | [static] |
Definition at line 726 of file BLI_kdopbvh.c.
References build_implicit_tree_helper(), BVHNode::bv, BVHNode::children, get_largest_axis(), i, implicit_leafs_index(), implicit_needed_branches(), BVHNode::main_axis, MAX_TREETYPE, MIN2, NULL, BVHNode::parent, refit_kdop_hull(), MakeCursor::root, split_leafs(), BVHNode::totnode, and BVHTree::tree_type.
Referenced by BLI_bvhtree_balance().
| static int partition_nth_element | ( | BVHNode ** | a, |
| int | _begin, | ||
| int | _end, | ||
| int | n, | ||
| int | axis | ||
| ) | [static] |
Definition at line 353 of file BLI_kdopbvh.c.
References bvh_insertionsort(), bvh_medianof3(), and bvh_partition().
Referenced by split_leafs().
| static float ray_nearest_hit | ( | BVHRayCastData * | data, |
| float * | bv | ||
| ) | [static] |
Definition at line 1442 of file BLI_kdopbvh.c.
References BVHTreeRayHit::dist, FLT_MAX, BVHRayCastData::hit, i, BVHTreeRay::origin, BVHTreeRay::radius, BVHRayCastData::ray, and BVHRayCastData::ray_dot_axis.
Referenced by BLI_bvhtree_bb_raycast(), and dfs_raycast().
Definition at line 421 of file BLI_kdopbvh.c.
References BVHNode::bv, FLT_MAX, i, BVHTree::nodes, and BVHTree::start_axis.
Referenced by non_recursive_bvh_div_nodes().
| static void split_leafs | ( | BVHNode ** | leafs_array, |
| int * | nth, | ||
| int | partitions, | ||
| int | split_axis | ||
| ) | [static] |
Definition at line 698 of file BLI_kdopbvh.c.
References i, and partition_nth_element().
Referenced by non_recursive_bvh_div_nodes().
| static float squared_dist | ( | const float * | a, |
| const float * | b | ||
| ) | [static] |
Definition at line 1200 of file BLI_kdopbvh.c.
Referenced by calc_nearest_point().
| static void traverse | ( | BVHOverlapData * | data, |
| BVHNode * | node1, | ||
| BVHNode * | node2 | ||
| ) | [static] |
Definition at line 1078 of file BLI_kdopbvh.c.
References BVHNode::children, BVHOverlapData::i, BVHNode::index, BVHTreeOverlap::indexA, BVHTreeOverlap::indexB, BVHOverlapData::max_overlap, BVHOverlapData::overlap, BVHOverlapData::start_axis, BVHOverlapData::stop_axis, BVHNode::totnode, BVHOverlapData::tree2, tree_overlap(), and BVHTree::tree_type.
Referenced by BLI_bvhtree_overlap().
| static int tree_overlap | ( | BVHNode * | node1, |
| BVHNode * | node2, | ||
| int | start_axis, | ||
| int | stop_axis | ||
| ) | [static] |
Definition at line 1058 of file BLI_kdopbvh.c.
References BVHNode::bv.
Referenced by BLI_bvhtree_overlap(), and traverse().
float KDOP_AXES[13][3] [static] |
{ {1.0, 0, 0}, {0, 1.0, 0}, {0, 0, 1.0}, {1.0, 1.0, 1.0}, {1.0, -1.0, 1.0}, {1.0, 1.0, -1.0},
{1.0, -1.0, -1.0}, {1.0, 1.0, 0}, {1.0, 0, 1.0}, {0, 1.0, 1.0}, {1.0, -1.0, 0}, {1.0, 0, -1.0},
{0, 1.0, -1.0}
}
Definition at line 124 of file BLI_kdopbvh.c.
Referenced by BLI_bvhtree_find_nearest(), BLI_bvhtree_ray_cast(), and create_kdop_hull().