|
Blender V4.3
|
#include "DNA_meshdata_types.h"#include "DNA_pointcloud_types.h"#include "BLI_math_geom.h"#include "BLI_task.h"#include "BKE_attribute.hh"#include "BKE_bvhutils.hh"#include "BKE_editmesh.hh"#include "BKE_mesh.hh"Go to the source code of this file.
Classes | |
| struct | BVHCacheItem |
| struct | BVHCache |
Functions | |
BVHCache | |
| static bool | bvhcache_find (BVHCache **bvh_cache_p, BVHCacheType type, BVHTree **r_tree, bool *r_locked, std::mutex *mesh_eval_mutex) |
| static void | bvhcache_unlock (BVHCache *bvh_cache, bool lock_started) |
| bool | bvhcache_has_tree (const BVHCache *bvh_cache, const BVHTree *tree) |
| BVHCache * | bvhcache_init () |
| static void | bvhcache_insert (BVHCache *bvh_cache, BVHTree *tree, BVHCacheType type) |
| void | bvhcache_free (BVHCache *bvh_cache) |
| static void | bvhtree_balance_isolated (void *userdata) |
| static void | bvhtree_balance (BVHTree *tree, const bool isolate) |
Local Callbacks | |
| float | bvhtree_ray_tri_intersection (const BVHTreeRay *ray, const float, const float v0[3], const float v1[3], const float v2[3]) |
| float | bvhtree_sphereray_tri_intersection (const BVHTreeRay *ray, float radius, const float m_dist, const float v0[3], const float v1[3], const float v2[3]) |
| static void | mesh_faces_nearest_point (void *userdata, int index, const float co[3], BVHTreeNearest *nearest) |
| static void | mesh_corner_tris_nearest_point (void *userdata, int index, const float co[3], BVHTreeNearest *nearest) |
| static void | mesh_faces_spherecast (void *userdata, int index, const BVHTreeRay *ray, BVHTreeRayHit *hit) |
| static void | mesh_corner_tris_spherecast (void *userdata, int index, const BVHTreeRay *ray, BVHTreeRayHit *hit) |
| static void | mesh_edges_nearest_point (void *userdata, int index, const float co[3], BVHTreeNearest *nearest) |
| static void | mesh_verts_spherecast_do (int index, const float v[3], const BVHTreeRay *ray, BVHTreeRayHit *hit) |
| static void | mesh_verts_spherecast (void *userdata, int index, const BVHTreeRay *ray, BVHTreeRayHit *hit) |
| static void | mesh_edges_spherecast (void *userdata, int index, const BVHTreeRay *ray, BVHTreeRayHit *hit) |
Common Utils | |
| static void | bvhtree_from_mesh_setup_data (BVHTree *tree, const BVHCacheType bvh_cache_type, const Span< float3 > positions, const Span< blender::int2 > edges, const Span< int > corner_verts, const Span< int3 > corner_tris, const MFace *face, BVHTreeFromMesh *r_data) |
| static BVHTree * | bvhtree_new_common (float epsilon, int tree_type, int axis, int elems_num, int &elems_num_active) |
Vertex Builder | |
| static BVHTree * | bvhtree_from_mesh_verts_create_tree (float epsilon, int tree_type, int axis, const Span< float3 > positions, const BitSpan verts_mask, int verts_num_active) |
| BVHTree * | bvhtree_from_mesh_verts_ex (BVHTreeFromMesh *data, const Span< float3 > vert_positions, const BitSpan verts_mask, int verts_num_active, float epsilon, int tree_type, int axis) |
Edge Builder | |
| static BVHTree * | bvhtree_from_mesh_edges_create_tree (const Span< float3 > positions, const blender::Span< blender::int2 > edges, const BitSpan edges_mask, int edges_num_active, float epsilon, int tree_type, int axis) |
| BVHTree * | bvhtree_from_mesh_edges_ex (BVHTreeFromMesh *data, const Span< float3 > vert_positions, const Span< blender::int2 > edges, const BitSpan edges_mask, int edges_num_active, float epsilon, int tree_type, int axis) |
Tessellated Face Builder | |
| static BVHTree * | bvhtree_from_mesh_faces_create_tree (float epsilon, int tree_type, int axis, const Span< float3 > positions, const MFace *face, const int faces_num, const BitSpan faces_mask, int faces_num_active) |
corner_tri Face Builder | |
| static BVHTree * | bvhtree_from_mesh_corner_tris_create_tree (float epsilon, int tree_type, int axis, const Span< float3 > positions, const Span< int > corner_verts, const Span< int3 > corner_tris, const BitSpan corner_tris_mask, int corner_tris_num_active) |
| BVHTree * | bvhtree_from_mesh_corner_tris_ex (BVHTreeFromMesh *data, const Span< float3 > vert_positions, const Span< int > corner_verts, const Span< int3 > corner_tris, const BitSpan corner_tris_mask, int corner_tris_num_active, float epsilon, int tree_type, int axis) |
| static BitVector | loose_verts_no_hidden_mask_get (const Mesh &mesh, int *r_elem_active_len) |
| static BitVector | loose_edges_no_hidden_mask_get (const Mesh &mesh, int *r_elem_active_len) |
| static BitVector | corner_tris_no_hidden_map_get (const blender::OffsetIndices< int > faces, const VArray< bool > &hide_poly, const int corner_tris_len, int *r_corner_tris_active_len) |
| BVHTree * | BKE_bvhtree_from_mesh_get (BVHTreeFromMesh *data, const Mesh *mesh, const BVHCacheType bvh_cache_type, const int tree_type) |
| void | BKE_bvhtree_from_mesh_tris_init (const Mesh &mesh, const blender::IndexMask &faces_mask, BVHTreeFromMesh &r_data) |
| void | BKE_bvhtree_from_mesh_edges_init (const Mesh &mesh, const blender::IndexMask &edges_mask, BVHTreeFromMesh &r_data) |
| void | BKE_bvhtree_from_mesh_verts_init (const Mesh &mesh, const blender::IndexMask &verts_mask, BVHTreeFromMesh &r_data) |
Free Functions | |
| void | free_bvhtree_from_mesh (BVHTreeFromMesh *data) |
Point Cloud BVH Building | |
| void | BKE_bvhtree_from_pointcloud_get (const PointCloud &pointcloud, const blender::IndexMask &points_mask, BVHTreeFromPointCloud &r_data) |
| void | free_bvhtree_from_pointcloud (BVHTreeFromPointCloud *data) |
| void BKE_bvhtree_from_mesh_edges_init | ( | const Mesh & | mesh, |
| const blender::IndexMask & | edges_mask, | ||
| BVHTreeFromMesh & | r_data ) |
Build a bvh tree containing the given edges.
Definition at line 1086 of file bvhutils.cc.
References BKE_bvhtree_from_mesh_get(), BLI_bvhtree_balance(), BLI_bvhtree_insert(), BVHTREE_FROM_EDGES, bvhtree_from_mesh_setup_data(), bvhtree_new_common(), copy_v3_v3(), blender::index_mask::IndexMask::foreach_index(), blender::index_mask::IndexMask::size(), BVHTreeFromMesh::tree, and tree.
Referenced by blender::nodes::node_geo_proximity_cc::ProximityFunction::init_for_mesh().
| BVHTree * BKE_bvhtree_from_mesh_get | ( | BVHTreeFromMesh * | data, |
| const Mesh * | mesh, | ||
| BVHCacheType | bvh_cache_type, | ||
| int | tree_type ) |
Builds or queries a BVH-cache for the cache BVH-tree of the request type.
Definition at line 899 of file bvhutils.cc.
References BLI_assert, BLI_assert_unreachable, BLI_bvhtree_get_tree_type(), bvhcache_find(), bvhcache_insert(), bvhcache_unlock(), bvhtree_balance(), BVHTREE_FROM_CORNER_TRIS, BVHTREE_FROM_CORNER_TRIS_NO_HIDDEN, BVHTREE_FROM_EDGES, BVHTREE_FROM_FACES, BVHTREE_FROM_LOOSEEDGES, BVHTREE_FROM_LOOSEEDGES_NO_HIDDEN, BVHTREE_FROM_LOOSEVERTS, BVHTREE_FROM_LOOSEVERTS_NO_HIDDEN, bvhtree_from_mesh_corner_tris_create_tree(), bvhtree_from_mesh_edges_create_tree(), bvhtree_from_mesh_faces_create_tree(), bvhtree_from_mesh_setup_data(), bvhtree_from_mesh_verts_create_tree(), BVHTREE_FROM_VERTS, BVHTREE_MAX_ITEM, CD_MFACE, corner_tris_no_hidden_map_get(), blender::bke::LooseGeomCache::count, CustomData_get_layer(), ELEM, blender::bke::LooseGeomCache::is_loose_bits, loose_edges_no_hidden_mask_get(), loose_verts_no_hidden_mask_get(), printf, and blender::Span< T >::size().
Referenced by BKE_bvhtree_from_mesh_edges_init(), BKE_bvhtree_from_mesh_tris_init(), BKE_bvhtree_from_mesh_verts_init(), BKE_mesh_remap_calc_difference_from_mesh(), BKE_mesh_remap_calc_edges_from_mesh(), BKE_mesh_remap_calc_faces_from_mesh(), BKE_mesh_remap_calc_loops_from_mesh(), BKE_mesh_remap_calc_verts_from_mesh(), BKE_shrinkwrap_init_tree(), cloth_build_springs(), deform_verts(), dynamicPaint_paintMesh(), blender::ed::sculpt_paint::AddOperationExecutor::execute(), blender::ed::sculpt_paint::DensityAddOperationExecutor::execute(), blender::ed::sculpt_paint::DensitySubtractOperationExecutor::execute(), blender::ed::sculpt_paint::PuffOperationExecutor::execute(), blender::ed::sculpt_paint::SlideOperationExecutor::execute(), followtrack_project_to_depth_object_if_needed(), blender::nodes::node_geo_sample_nearest_cc::get_closest_mesh_edges(), blender::nodes::node_geo_sample_nearest_cc::get_closest_mesh_points(), blender::nodes::node_geo_sample_nearest_cc::get_closest_mesh_tris(), get_vert2geom_distance(), harmonic_coordinates_bind(), imapaint_pick_face(), blender::bke::mesh_remesh_reproject_attributes(), blender::ed::sculpt_paint::min_distance_edit::min_distance_edit_invoke(), PE_create_shape_tree(), blender::nodes::node_geo_raycast_cc::raycast_to_mesh(), RE_bake_pixels_populate_from_objects(), remap_hair_emitter(), blender::ed::sculpt_paint::sample_curves_3d_brush(), blender::ed::curves::snap_curves_to_surface::snap_curves_to_surface_exec_object(), snap_object_data_mesh_get(), snapMesh(), blender::geometry::curve_constraints::solve_length_and_collision_constraints(), blender::draw::statvis_calc_intersect(), blender::draw::statvis_calc_thickness(), surfacedeformBind(), blender::ed::curves::convert_to_particle_system::try_convert_single_object(), and blender::ed::sculpt_paint::use_add_density_mode().
| void BKE_bvhtree_from_mesh_tris_init | ( | const Mesh & | mesh, |
| const blender::IndexMask & | faces_mask, | ||
| BVHTreeFromMesh & | r_data ) |
Build a bvh tree from the triangles in the mesh that correspond to the faces in the given mask.
Definition at line 1033 of file bvhutils.cc.
References BKE_bvhtree_from_mesh_get(), BLI_bvhtree_balance(), BLI_bvhtree_insert(), BVHTREE_FROM_CORNER_TRIS, bvhtree_from_mesh_setup_data(), bvhtree_new_common(), copy_v3_v3(), blender::index_mask::IndexMask::foreach_index(), blender::index_mask::IndexMask::size(), size(), BVHTreeFromMesh::tree, and tree.
Referenced by blender::nodes::node_geo_proximity_cc::ProximityFunction::init_for_mesh(), and blender::nodes::node_geo_sample_nearest_surface_cc::SampleNearestSurfaceFunction::SampleNearestSurfaceFunction().
| void BKE_bvhtree_from_mesh_verts_init | ( | const Mesh & | mesh, |
| const blender::IndexMask & | verts_mask, | ||
| BVHTreeFromMesh & | r_data ) |
Build a bvh tree containing the given vertices.
Definition at line 1122 of file bvhutils.cc.
References BKE_bvhtree_from_mesh_get(), BLI_bvhtree_balance(), BLI_bvhtree_insert(), bvhtree_from_mesh_setup_data(), BVHTREE_FROM_VERTS, bvhtree_new_common(), blender::index_mask::IndexMask::foreach_index(), blender::index_mask::IndexMask::size(), BVHTreeFromMesh::tree, and tree.
Referenced by blender::nodes::node_geo_proximity_cc::ProximityFunction::init_for_mesh().
| void BKE_bvhtree_from_pointcloud_get | ( | const PointCloud & | pointcloud, |
| const blender::IndexMask & | points_mask, | ||
| BVHTreeFromPointCloud & | r_data ) |
Definition at line 1175 of file bvhutils.cc.
References BLI_bvhtree_balance(), BLI_bvhtree_insert(), bvhtree_new_common(), BVHTreeFromPointCloud::coords, float, blender::index_mask::IndexMask::foreach_index(), BVHTreeFromPointCloud::nearest_callback, blender::index_mask::IndexMask::size(), BVHTreeFromPointCloud::tree, and tree.
Referenced by blender::nodes::node_geo_sample_nearest_cc::get_closest_pointcloud_points(), and blender::nodes::node_geo_proximity_cc::ProximityFunction::init_for_pointcloud().
|
static |
Queries a bvhcache for the cache bvhtree of the request type
When the r_locked is filled and the tree could not be found the caches mutex will be locked. This mutex can be unlocked by calling bvhcache_unlock.
When r_locked is used the mesh_eval_mutex must contain the MeshRuntime.eval_mutex.
Definition at line 50 of file bvhutils.cc.
References BLI_mutex_lock(), BLI_mutex_unlock(), bvhcache_find(), bvhcache_init(), BVHCacheItem::is_filled, BVHCache::items, lock, BVHCache::mutex, and BVHCacheItem::tree.
Referenced by BKE_bvhtree_from_mesh_get(), and bvhcache_find().
| void bvhcache_free | ( | BVHCache * | bvh_cache | ) |
Frees a BVH-cache.
Definition at line 132 of file bvhutils.cc.
References BLI_bvhtree_free(), BLI_mutex_end(), BVHTREE_MAX_ITEM, BVHCache::items, MEM_freeN(), BVHCache::mutex, and BVHCacheItem::tree.
Referenced by blender::bke::free_bvh_cache().
Definition at line 96 of file bvhutils.cc.
References BVHTREE_MAX_ITEM, BVHCache::items, BVHCacheItem::tree, and tree.
| BVHCache * bvhcache_init | ( | ) |
Definition at line 110 of file bvhutils.cc.
References BLI_mutex_init(), and BVHCache::mutex.
Referenced by bvhcache_find().
|
static |
Inserts a BVHTree of the given type under the cache After that the caller no longer needs to worry when to free the BVHTree as that will be done when the cache is freed.
A call to this assumes that there was no previous cached tree of the given type
Definition at line 124 of file bvhutils.cc.
References BLI_assert, BVHCacheItem::is_filled, BVHCache::items, BVHCacheItem::tree, and tree.
Referenced by BKE_bvhtree_from_mesh_get().
|
static |
Definition at line 89 of file bvhutils.cc.
References BLI_mutex_unlock(), and BVHCache::mutex.
Referenced by BKE_bvhtree_from_mesh_get().
|
static |
Definition at line 153 of file bvhutils.cc.
References BLI_bvhtree_balance(), BLI_task_isolate(), bvhtree_balance_isolated(), and tree.
Referenced by BKE_bvhtree_from_mesh_get(), bvhtree_from_mesh_corner_tris_ex(), bvhtree_from_mesh_edges_ex(), and bvhtree_from_mesh_verts_ex().
|
static |
BVH-tree balancing inside a mutex lock must be run in isolation. Balancing is multithreaded, and we do not want the current thread to start another task that may involve acquiring the same mutex lock that it is waiting for.
Definition at line 148 of file bvhutils.cc.
References BLI_bvhtree_balance().
Referenced by bvhtree_balance().
|
static |
Definition at line 710 of file bvhutils.cc.
References BLI_assert, BLI_bvhtree_get_len(), BLI_bvhtree_insert(), bvhtree_new_common(), copy_v3_v3(), blender::Span< T >::index_range(), blender::Span< T >::size(), and tree.
Referenced by BKE_bvhtree_from_mesh_get(), and bvhtree_from_mesh_corner_tris_ex().
| BVHTree * bvhtree_from_mesh_corner_tris_ex | ( | BVHTreeFromMesh * | data, |
| const Span< float3 > | vert_positions, | ||
| const Span< int > | corner_verts, | ||
| const Span< int3 > | corner_tris, | ||
| const BitSpan | corner_tris_mask, | ||
| int | corner_tris_num_active, | ||
| float | epsilon, | ||
| int | tree_type, | ||
| int | axis ) |
Definition at line 748 of file bvhutils.cc.
References bvhtree_balance(), BVHTREE_FROM_CORNER_TRIS, bvhtree_from_mesh_corner_tris_create_tree(), bvhtree_from_mesh_setup_data(), data, and tree.
|
static |
Definition at line 612 of file bvhutils.cc.
References BLI_bvhtree_insert(), bvhtree_new_common(), copy_v3_v3(), and tree.
Referenced by BKE_bvhtree_from_mesh_get(), and bvhtree_from_mesh_edges_ex().
| BVHTree * bvhtree_from_mesh_edges_ex | ( | BVHTreeFromMesh * | data, |
| const Span< float3 > | vert_positions, | ||
| const Span< blender::int2 > | edges, | ||
| const BitSpan | edges_mask, | ||
| int | edges_num_active, | ||
| float | epsilon, | ||
| int | tree_type, | ||
| int | axis ) |
Definition at line 639 of file bvhutils.cc.
References bvhtree_balance(), BVHTREE_FROM_EDGES, bvhtree_from_mesh_edges_create_tree(), bvhtree_from_mesh_setup_data(), data, and tree.
|
static |
Definition at line 668 of file bvhutils.cc.
References BLI_assert, BLI_bvhtree_get_len(), BLI_bvhtree_insert(), bvhtree_new_common(), copy_v3_v3(), tree, and v2.
Referenced by BKE_bvhtree_from_mesh_get().
|
static |
Definition at line 490 of file bvhutils.cc.
References BLI_assert, BVHTREE_FROM_CORNER_TRIS, BVHTREE_FROM_CORNER_TRIS_NO_HIDDEN, BVHTREE_FROM_EDGES, BVHTREE_FROM_FACES, BVHTREE_FROM_LOOSEEDGES, BVHTREE_FROM_LOOSEEDGES_NO_HIDDEN, BVHTREE_FROM_LOOSEVERTS, BVHTREE_FROM_LOOSEVERTS_NO_HIDDEN, BVHTREE_FROM_VERTS, BVHTREE_MAX_ITEM, BVHTreeFromMesh::corner_tris, BVHTreeFromMesh::corner_verts, BVHTreeFromMesh::edges, BVHTreeFromMesh::face, mesh_corner_tris_nearest_point(), mesh_corner_tris_spherecast(), mesh_edges_nearest_point(), mesh_edges_spherecast(), mesh_faces_nearest_point(), mesh_faces_spherecast(), mesh_verts_spherecast(), BVHTreeFromMesh::nearest_callback, BVHTreeFromMesh::raycast_callback, BVHTreeFromMesh::tree, tree, and BVHTreeFromMesh::vert_positions.
Referenced by BKE_bvhtree_from_mesh_edges_init(), BKE_bvhtree_from_mesh_get(), BKE_bvhtree_from_mesh_tris_init(), BKE_bvhtree_from_mesh_verts_init(), bvhtree_from_mesh_corner_tris_ex(), bvhtree_from_mesh_edges_ex(), and bvhtree_from_mesh_verts_ex().
|
static |
Definition at line 562 of file bvhutils.cc.
References BLI_assert, BLI_bvhtree_get_len(), BLI_bvhtree_insert(), bvhtree_new_common(), and tree.
Referenced by BKE_bvhtree_from_mesh_get(), and bvhtree_from_mesh_verts_ex().
| BVHTree * bvhtree_from_mesh_verts_ex | ( | BVHTreeFromMesh * | data, |
| const Span< float3 > | vert_positions, | ||
| const BitSpan | verts_mask, | ||
| int | verts_num_active, | ||
| float | epsilon, | ||
| int | tree_type, | ||
| int | axis ) |
Definition at line 585 of file bvhutils.cc.
References bvhtree_balance(), bvhtree_from_mesh_setup_data(), bvhtree_from_mesh_verts_create_tree(), BVHTREE_FROM_VERTS, data, and tree.
|
static |
Definition at line 539 of file bvhutils.cc.
References BLI_assert, BLI_bvhtree_new(), and IN_RANGE_INCL.
Referenced by BKE_bvhtree_from_mesh_edges_init(), BKE_bvhtree_from_mesh_tris_init(), BKE_bvhtree_from_mesh_verts_init(), BKE_bvhtree_from_pointcloud_get(), bvhtree_from_mesh_corner_tris_create_tree(), bvhtree_from_mesh_edges_create_tree(), bvhtree_from_mesh_faces_create_tree(), and bvhtree_from_mesh_verts_create_tree().
| float bvhtree_ray_tri_intersection | ( | const BVHTreeRay * | ray, |
| float | m_dist, | ||
| const float | v0[3], | ||
| const float | v1[3], | ||
| const float | v2[3] ) |
Math functions used by callbacks
Definition at line 173 of file bvhutils.cc.
References FLT_MAX, isect_ray_tri_epsilon_v3(), isect_ray_tri_watertight_v3(), and v2.
Referenced by mesh_corner_tris_raycast_backface_culling_cb(), mesh_corner_tris_spherecast(), mesh_faces_spherecast(), mesh_tris_spherecast_dp(), and py_bvhtree_raycast_cb().
| float bvhtree_sphereray_tri_intersection | ( | const BVHTreeRay * | ray, |
| float | radius, | ||
| const float | m_dist, | ||
| const float | v0[3], | ||
| const float | v1[3], | ||
| const float | v2[3] ) |
Definition at line 194 of file bvhutils.cc.
References FLT_MAX, isect_sweeping_sphere_tri_v3(), madd_v3_v3v3fl(), and v2.
Referenced by mesh_corner_tris_spherecast(), mesh_faces_spherecast(), and py_bvhtree_raycast_cb().
|
static |
Definition at line 867 of file bvhutils.cc.
References blender::bke::mesh::face_triangles_num(), blender::VArrayCommon< T >::get_internal_single(), blender::VArrayCommon< T >::is_single(), size(), and UNUSED_VARS.
Referenced by BKE_bvhtree_from_mesh_get().
| void free_bvhtree_from_mesh | ( | BVHTreeFromMesh * | data | ) |
Frees data allocated by a call to bvhtree_from_mesh_*.
Definition at line 1160 of file bvhutils.cc.
References BLI_bvhtree_free().
Referenced by BKE_mesh_remap_calc_edges_from_mesh(), BKE_mesh_remap_calc_faces_from_mesh(), BKE_mesh_remap_calc_loops_from_mesh(), BKE_mesh_remap_calc_verts_from_mesh(), BKE_shrinkwrap_free_tree(), cloth_build_springs(), deform_verts(), dynamicPaint_paintMesh(), blender::ed::sculpt_paint::AddOperationExecutor::execute(), blender::ed::sculpt_paint::DensityAddOperationExecutor::execute(), blender::ed::sculpt_paint::DensitySubtractOperationExecutor::execute(), blender::ed::sculpt_paint::PuffOperationExecutor::execute(), blender::ed::sculpt_paint::SlideOperationExecutor::execute(), followtrack_project_to_depth_object_if_needed(), free_data(), blender::nodes::node_geo_sample_nearest_cc::get_closest_mesh_edges(), blender::nodes::node_geo_sample_nearest_cc::get_closest_mesh_points(), blender::nodes::node_geo_sample_nearest_cc::get_closest_mesh_tris(), get_vert2geom_distance(), harmonic_coordinates_bind(), imapaint_pick_face(), blender::bke::mesh_remesh_reproject_attributes(), blender::ed::sculpt_paint::min_distance_edit::min_distance_edit_invoke(), PE_free_shape_tree(), blender::nodes::node_geo_raycast_cc::raycast_to_mesh(), RE_bake_pixels_populate_from_objects(), remap_hair_emitter(), blender::ed::sculpt_paint::sample_curves_3d_brush(), blender::ed::curves::snap_curves_to_surface::snap_curves_to_surface_exec_object(), blender::geometry::curve_constraints::solve_length_and_collision_constraints(), surfacedeformBind(), blender::ed::curves::convert_to_particle_system::try_convert_single_object(), blender::ed::sculpt_paint::use_add_density_mode(), blender::nodes::node_geo_proximity_cc::ProximityFunction::~ProximityFunction(), and blender::nodes::node_geo_sample_nearest_surface_cc::SampleNearestSurfaceFunction::~SampleNearestSurfaceFunction().
| void free_bvhtree_from_pointcloud | ( | BVHTreeFromPointCloud * | data | ) |
Definition at line 1196 of file bvhutils.cc.
References BLI_bvhtree_free().
Referenced by blender::nodes::node_geo_sample_nearest_cc::get_closest_pointcloud_points(), and blender::nodes::node_geo_proximity_cc::ProximityFunction::~ProximityFunction().
|
static |
Definition at line 825 of file bvhutils.cc.
References count, and blender::Span< T >::slice().
Referenced by BKE_bvhtree_from_mesh_get().
|
static |
Definition at line 784 of file bvhutils.cc.
References count.
Referenced by BKE_bvhtree_from_mesh_get().
|
static |
Definition at line 258 of file bvhutils.cc.
References closest_on_tri_to_point_v3(), copy_v3_v3(), len_squared_v3v3(), normal_tri_v3(), and UNPACK3.
Referenced by bvhtree_from_mesh_setup_data().
|
static |
Definition at line 327 of file bvhutils.cc.
References bvhtree_ray_tri_intersection(), bvhtree_sphereray_tri_intersection(), madd_v3_v3v3fl(), normal_tri_v3(), and UNPACK3.
Referenced by bvhtree_from_mesh_setup_data().
|
static |
Callback to BVH-tree nearest point. The tree must have been built using #bvhtree_from_mesh_edges.
| userdata | Must be a #BVHMeshCallbackUserdata built from the same mesh as the tree. |
Definition at line 364 of file bvhutils.cc.
References closest_to_line_segment_v3(), copy_v3_v3(), len_squared_v3v3(), normalize_v3(), and sub_v3_v3v3().
Referenced by bvhtree_from_mesh_setup_data().
|
static |
Callback to BVH-tree ray-cast. The tree must have been built using bvhtree_from_mesh_edges.
| userdata | Must be a #BVHMeshCallbackUserdata built from the same mesh as the tree. |
Definition at line 435 of file bvhutils.cc.
References add_v3_v3v3(), copy_v3_v3(), dot_v3v3v3(), equals_v3v3(), isect_line_line_v3(), len_squared_v3v3(), len_v3v3(), line_point_factor_v3(), mesh_verts_spherecast_do(), square_f(), and v2.
Referenced by bvhtree_from_mesh_setup_data().
|
static |
Callback to BVH-tree nearest point. The tree must have been built using #bvhtree_from_mesh_faces.
| userdata | Must be a #BVHMeshCallbackUserdata built from the same mesh as the tree. |
Definition at line 224 of file bvhutils.cc.
References closest_on_tri_to_point_v3(), copy_v3_v3(), len_squared_v3v3(), normal_tri_v3(), and MFace::v4.
Referenced by bvhtree_from_mesh_setup_data().
|
static |
Callback to BVH-tree ray-cast. The tree must have been built using bvhtree_from_mesh_faces.
| userdata | Must be a #BVHMeshCallbackUserdata built from the same mesh as the tree. |
Definition at line 289 of file bvhutils.cc.
References bvhtree_ray_tri_intersection(), bvhtree_sphereray_tri_intersection(), madd_v3_v3v3fl(), normal_tri_v3(), and MFace::v4.
Referenced by bvhtree_from_mesh_setup_data().
|
static |
Callback to BVH-tree ray-cast. The tree must have been built using bvhtree_from_mesh_verts.
| userdata | Must be a #BVHMeshCallbackUserdata built from the same mesh as the tree. |
Definition at line 418 of file bvhutils.cc.
References mesh_verts_spherecast_do(), and v.
Referenced by bvhtree_from_mesh_setup_data().
|
static |
Definition at line 391 of file bvhutils.cc.
References add_v3_v3v3(), closest_to_line_segment_v3(), copy_v3_v3(), dot_v3v3v3(), len_v3v3(), and v.
Referenced by mesh_edges_spherecast(), and mesh_verts_spherecast().