|
Blender
V2.59
|
#include <float.h>Go to the source code of this file.
Classes | |
| struct | BVHTreeOverlap |
| struct | BVHTreeNearest |
| struct | BVHTreeRay |
| struct | BVHTreeRayHit |
Typedefs | |
| typedef struct BVHTree | BVHTree |
| typedef struct BVHTreeOverlap | BVHTreeOverlap |
| typedef struct BVHTreeNearest | BVHTreeNearest |
| typedef struct BVHTreeRay | BVHTreeRay |
| typedef struct BVHTreeRayHit | BVHTreeRayHit |
| typedef void(* | BVHTree_NearestPointCallback )(void *userdata, int index, const float *co, BVHTreeNearest *nearest) |
| typedef void(* | BVHTree_RayCastCallback )(void *userdata, int index, const BVHTreeRay *ray, BVHTreeRayHit *hit) |
| typedef void(* | BVHTree_RangeQuery )(void *userdata, int index, float squared_dist) |
Functions | |
| BVHTree * | BLI_bvhtree_new (int maxsize, float epsilon, char tree_type, char axis) |
| void | BLI_bvhtree_free (BVHTree *tree) |
| int | BLI_bvhtree_insert (BVHTree *tree, int index, float *co, int numpoints) |
| void | BLI_bvhtree_balance (BVHTree *tree) |
| int | BLI_bvhtree_update_node (BVHTree *tree, int index, float *co, float *co_moving, int numpoints) |
| void | BLI_bvhtree_update_tree (BVHTree *tree) |
| BVHTreeOverlap * | BLI_bvhtree_overlap (BVHTree *tree1, BVHTree *tree2, unsigned int *result) |
| float | BLI_bvhtree_getepsilon (BVHTree *tree) |
| int | BLI_bvhtree_find_nearest (BVHTree *tree, const float *co, BVHTreeNearest *nearest, BVHTree_NearestPointCallback callback, void *userdata) |
| 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) |
| int | BLI_bvhtree_range_query (BVHTree *tree, const float *co, float radius, BVHTree_RangeQuery callback, void *userdata) |
Definition in file BLI_kdopbvh.h.
Definition at line 47 of file BLI_kdopbvh.h.
| typedef void(* BVHTree_NearestPointCallback)(void *userdata, int index, const float *co, BVHTreeNearest *nearest) |
Definition at line 78 of file BLI_kdopbvh.h.
| typedef void(* BVHTree_RangeQuery)(void *userdata, int index, float squared_dist) |
Definition at line 84 of file BLI_kdopbvh.h.
| typedef void(* BVHTree_RayCastCallback)(void *userdata, int index, const BVHTreeRay *ray, BVHTreeRayHit *hit) |
Definition at line 81 of file BLI_kdopbvh.h.
| typedef struct BVHTreeNearest BVHTreeNearest |
| typedef struct BVHTreeOverlap BVHTreeOverlap |
| typedef struct BVHTreeRay BVHTreeRay |
| typedef struct BVHTreeRayHit BVHTreeRayHit |
| 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().