Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/geometry/nodes/node_geo_attribute_proximity.cc
| Show First 20 Lines • Show All 64 Lines • ▼ Show 20 Lines | static void proximity_calc(MutableSpan<float> distance_span, | ||||
| const VArray<float3> &positions, | const VArray<float3> &positions, | ||||
| BVHTreeFromMesh &tree_data_mesh, | BVHTreeFromMesh &tree_data_mesh, | ||||
| BVHTreeFromPointCloud &tree_data_pointcloud, | BVHTreeFromPointCloud &tree_data_pointcloud, | ||||
| const bool bvh_mesh_success, | const bool bvh_mesh_success, | ||||
| const bool bvh_pointcloud_success, | const bool bvh_pointcloud_success, | ||||
| const bool store_distances, | const bool store_distances, | ||||
| const bool store_locations) | const bool store_locations) | ||||
| { | { | ||||
| IndexRange range = positions.index_range(); | IndexRange range = iter_indices(positions); | ||||
| parallel_for(range, 512, [&](IndexRange range) { | parallel_for(range, 512, [&](IndexRange range) { | ||||
| BVHTreeNearest nearest_from_mesh; | BVHTreeNearest nearest_from_mesh; | ||||
| BVHTreeNearest nearest_from_pointcloud; | BVHTreeNearest nearest_from_pointcloud; | ||||
| copy_v3_fl(nearest_from_mesh.co, FLT_MAX); | copy_v3_fl(nearest_from_mesh.co, FLT_MAX); | ||||
| copy_v3_fl(nearest_from_pointcloud.co, FLT_MAX); | copy_v3_fl(nearest_from_pointcloud.co, FLT_MAX); | ||||
| nearest_from_mesh.index = -1; | nearest_from_mesh.index = -1; | ||||
| ▲ Show 20 Lines • Show All 197 Lines • Show Last 20 Lines | |||||