Blender V2.61 - r43446
|
#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 | |
class | 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, const 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, const float *co, int numpoints) |
int | BLI_bvhtree_update_node (BVHTree *tree, int index, const float *co, const 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 | calc_nearest_point (const float proj[3], 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[3], 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[3], const float dir[3], float radius, BVHTreeRayHit *hit, BVHTree_RayCastCallback callback, void *userdata) |
float | BLI_bvhtree_bb_raycast (float *bv, const float light_start[3], const float light_end[3], float pos[3]) |
static void | dfs_range_query (RangeQueryData *data, BVHNode *node) |
int | BLI_bvhtree_range_query (BVHTree *tree, const float co[3], 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 51 of file BLI_kdopbvh.c.
#define MAX_TREETYPE 32 |
Definition at line 50 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 1243 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 149 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 132 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, |
const float | light_start[3], | ||
const float | light_end[3], | ||
float | pos[3] | ||
) |
Definition at line 1623 of file BLI_kdopbvh.c.
References copy_v3_v3(), data, BVHTreeRay::direction, BVHTreeRayHit::dist, FLT_MAX, BVHRayCastData::hit, madd_v3_v3v3fl(), normalize_v3(), BVHTreeRay::origin, BVHTreeRay::radius, BVHRayCastData::ray, BVHRayCastData::ray_dot_axis, and ray_nearest_hit().
int BLI_bvhtree_find_nearest | ( | BVHTree * | tree, |
const float | co[3], | ||
BVHTreeNearest * | nearest, | ||
BVHTree_NearestPointCallback | callback, | ||
void * | userdata | ||
) |
Definition at line 1380 of file BLI_kdopbvh.c.
References BVHNearestData::callback, co, BVHNearestData::co, data, dfs_find_nearest_begin(), BVHTreeNearest::dist, dot_v3v3(), FLT_MAX, i, BVHTreeNearest::index, 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(), dynamicPaint_paintMesh(), get_vert2geom_distance(), 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, | ||
const 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, data, addon::engine::free(), BVHOverlapData::i, MAX2, BVHOverlapData::max_overlap, MEM_callocN(), MEM_freeN(), MIN2, BVHTree::nodes, NULL, BVHOverlapData::overlap, BVHTree::start_axis, BVHOverlapData::start_axis, BVHOverlapData::stop_axis, BVHTree::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[3], | ||
float | radius, | ||
BVHTree_RangeQuery | callback, | ||
void * | userdata | ||
) |
Definition at line 1709 of file BLI_kdopbvh.c.
References calc_nearest_point(), RangeQueryData::callback, RangeQueryData::center, co, data, 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[3], | ||
const float | dir[3], | ||
float | radius, | ||
BVHTreeRayHit * | hit, | ||
BVHTree_RayCastCallback | callback, | ||
void * | userdata | ||
) |
Definition at line 1569 of file BLI_kdopbvh.c.
References BVHRayCastData::callback, copy_v3_v3(), data, dfs_raycast(), BVHTreeRay::direction, BVHTreeRayHit::dist, dot_v3v3(), fabsf, FLT_MAX, BVHRayCastData::hit, i, BVHRayCastData::idot_axis, BVHTreeRayHit::index, BVHRayCastData::index, KDOP_AXES, BVHTree::nodes, normalize_v3(), BVHTreeRay::origin, BVHTreeRay::radius, BVHRayCastData::ray, BVHRayCastData::ray_dot_axis, MakeCursor::root, BVHTree::totleaf, BVHRayCastData::tree, and BVHRayCastData::userdata.
int BLI_bvhtree_update_node | ( | BVHTree * | tree, |
int | index, | ||
const float * | co, | ||
const 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, BVHBuildHelper::tree_type, and BVHTree::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 214 of file BLI_kdopbvh.c.
References BVHNode::bv, and i.
Referenced by partition_nth_element().
Definition at line 283 of file BLI_kdopbvh.c.
Referenced by partition_nth_element().
Definition at line 231 of file BLI_kdopbvh.c.
References BVHNode::bv, i, and SWAP.
Referenced by partition_nth_element().
static float calc_nearest_point | ( | const float | proj[3], |
BVHNode * | node, | ||
float * | nearest | ||
) | [static] |
Definition at line 1197 of file BLI_kdopbvh.c.
References BVHNode::bv, i, and len_squared_v3v3().
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, | ||
const float * | co, | ||
int | numpoints, | ||
int | moving | ||
) | [static] |
Definition at line 390 of file BLI_kdopbvh.c.
References BVHNode::bv, dot_v3v3(), FLT_MAX, i, 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 1284 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 1246 of file BLI_kdopbvh.c.
References BVHNode::bv, calc_nearest_point(), BVHNearestData::callback, BVHNode::children, BVHNearestData::co, BVHTreeNearest::co, BVHTreeNearest::dist, i, BVHNode::index, BVHTreeNearest::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 1675 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 1495 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, madd_v3_v3v3fl(), BVHNode::main_axis, BVHTreeRay::origin, BVHTreeRay::radius, BVHRayCastData::ray, BVHRayCastData::ray_dot_axis, ray_nearest_hit(), BVHNode::totnode, and BVHRayCastData::userdata.
Referenced by BLI_bvhtree_ray_cast().
static float fast_ray_nearest_hit | ( | const BVHRayCastData * | data, |
const BVHNode * | node | ||
) | [static] |
Definition at line 1473 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, data, 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 352 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 1431 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 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 123 of file BLI_kdopbvh.c.
Referenced by BLI_bvhtree_find_nearest(), BLI_bvhtree_ray_cast(), and create_kdop_hull().