Blender V5.0
bvhutils.cc File Reference
#include "DNA_meshdata_types.h"
#include "DNA_pointcloud_types.h"
#include "BLI_math_geom.h"
#include "BKE_attribute.hh"
#include "BKE_bvhutils.hh"
#include "BKE_editmesh.hh"
#include "BKE_mesh.hh"
#include "BKE_pointcloud.hh"

Go to the source code of this file.

Namespaces

namespace  blender
namespace  blender::bke

Functions

BVHTreeFromMesh blender::bke::bvhtree_from_mesh_tris_init (const Mesh &mesh, const IndexMask &faces_mask)
BVHTreeFromMesh blender::bke::bvhtree_from_mesh_edges_init (const Mesh &mesh, const IndexMask &edges_mask)
BVHTreeFromMesh blender::bke::bvhtree_from_mesh_verts_init (const Mesh &mesh, const IndexMask &verts_mask)
Local Callbacks
float blender::bke::bvhtree_ray_tri_intersection (const BVHTreeRay *ray, float m_dist, const float v0[3], const float v1[3], const float v2[3])
float blender::bke::bvhtree_sphereray_tri_intersection (const BVHTreeRay *ray, float radius, float m_dist, const float v0[3], const float v1[3], const float v2[3])
static void blender::bke::mesh_faces_nearest_point (void *userdata, int index, const float co[3], BVHTreeNearest *nearest)
static void blender::bke::mesh_corner_tris_nearest_point (void *userdata, int index, const float co[3], BVHTreeNearest *nearest)
static void blender::bke::mesh_faces_spherecast (void *userdata, int index, const BVHTreeRay *ray, BVHTreeRayHit *hit)
static void blender::bke::mesh_corner_tris_spherecast (void *userdata, int index, const BVHTreeRay *ray, BVHTreeRayHit *hit)
static void blender::bke::mesh_edges_nearest_point (void *userdata, int index, const float co[3], BVHTreeNearest *nearest)
static void blender::bke::mesh_verts_spherecast_do (int index, const float v[3], const BVHTreeRay *ray, BVHTreeRayHit *hit)
static void blender::bke::mesh_verts_spherecast (void *userdata, int index, const BVHTreeRay *ray, BVHTreeRayHit *hit)
static void blender::bke::mesh_edges_spherecast (void *userdata, int index, const BVHTreeRay *ray, BVHTreeRayHit *hit)
Common Utils
static BVHTreeFromMesh blender::bke::create_verts_tree_data (const BVHTree *tree, const Span< float3 > positions)
static BVHTreeFromMesh blender::bke::create_verts_tree_data (std::unique_ptr< BVHTree, BVHTreeDeleter > tree, const Span< float3 > positions)
static BVHTreeFromMesh blender::bke::create_edges_tree_data (const BVHTree *tree, const Span< float3 > positions, const Span< int2 > edges)
static BVHTreeFromMesh blender::bke::create_edges_tree_data (std::unique_ptr< BVHTree, BVHTreeDeleter > tree, const Span< float3 > positions, const Span< int2 > edges)
static BVHTreeFromMesh blender::bke::create_legacy_faces_tree_data (const BVHTree *tree, const Span< float3 > positions, const MFace *face)
static BVHTreeFromMesh blender::bke::create_tris_tree_data (const BVHTree *tree, const Span< float3 > positions, const Span< int > corner_verts, const Span< int3 > corner_tris)
static BVHTreeFromMesh blender::bke::create_tris_tree_data (std::unique_ptr< BVHTree, BVHTreeDeleter > tree, const Span< float3 > positions, const Span< int > corner_verts, const Span< int3 > corner_tris)
static std::unique_ptr< BVHTree, BVHTreeDeleterblender::bke::bvhtree_new_common (int elems_num)
static std::unique_ptr< BVHTree, BVHTreeDeleterblender::bke::create_tree_from_verts (const Span< float3 > positions, const IndexMask &verts_mask)
BVHTreeFromMesh blender::bke::bvhtree_from_mesh_verts_ex (Span< float3 > vert_positions, const IndexMask &verts_mask)
static std::unique_ptr< BVHTree, BVHTreeDeleterblender::bke::create_tree_from_edges (const Span< float3 > positions, const Span< int2 > edges, const IndexMask &edges_mask)
BVHTreeFromMesh blender::bke::bvhtree_from_mesh_edges_ex (Span< float3 > vert_positions, Span< int2 > edges, const IndexMask &edges_mask)
static std::unique_ptr< BVHTree, BVHTreeDeleterblender::bke::create_tree_from_legacy_faces (const Span< float3 > positions, const Span< MFace > faces)
static std::unique_ptr< BVHTree, BVHTreeDeleterblender::bke::create_tree_from_tris (const Span< float3 > positions, const Span< int > corner_verts, const Span< int3 > corner_tris)
static std::unique_ptr< BVHTree, BVHTreeDeleterblender::bke::create_tree_from_tris (const Span< float3 > positions, const OffsetIndices< int > faces, const Span< int > corner_verts, const Span< int3 > corner_tris, const IndexMask &faces_mask)
BVHTreeFromMesh blender::bke::bvhtree_from_mesh_corner_tris_ex (Span< float3 > vert_positions, OffsetIndices< int > faces, Span< int > corner_verts, Span< int3 > corner_tris, const IndexMask &faces_mask)
static BitVector blender::bke::loose_verts_no_hidden_mask_get (const Mesh &mesh)
static BitVector blender::bke::loose_edges_no_hidden_mask_get (const Mesh &mesh)
Point Cloud BVH Building
static BVHTreeFromPointCloud blender::bke::create_points_tree_data (const BVHTree *tree, const Span< float3 > positions)
static BVHTreeFromPointCloud blender::bke::create_pointcloud_tree_data (const BVHTree *tree, const Span< float3 > positions)
static BVHTreeFromPointCloud blender::bke::create_pointcloud_tree_data (std::unique_ptr< BVHTree, BVHTreeDeleter > tree, const Span< float3 > positions)
BVHTreeFromPointCloud blender::bke::bvhtree_from_pointcloud_get (const PointCloud &pointcloud, const IndexMask &points_mask)