Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/pbvh_bmesh.c
| Context not available. | |||||
| float location[3] = {0.0f}; | float location[3] = {0.0f}; | ||||
| madd_v3_v3v3fl(location, ray_start, ray_normal, *depth); | madd_v3_v3v3fl(location, ray_start, ray_normal, *depth); | ||||
| for (int j = 0; j < 3; j++) { | for (int j = 0; j < 3; j++) { | ||||
| if (len_squared_v3v3(location, cos[j]) < | if (j == 0 || len_squared_v3v3(location, cos[j]) < | ||||
| len_squared_v3v3(location, nearest_vertex_co)) { | len_squared_v3v3(location, nearest_vertex_co)) { | ||||
| copy_v3_v3(nearest_vertex_co, cos[j]); | copy_v3_v3(nearest_vertex_co, cos[j]); | ||||
| r_active_vertex->i = (intptr_t)node->bm_orvert[node->bm_ortri[i][j]]; | r_active_vertex->i = (intptr_t)node->bm_orvert[node->bm_ortri[i][j]]; | ||||
| } | } | ||||
| Context not available. | |||||
| float location[3] = {0.0f}; | float location[3] = {0.0f}; | ||||
| madd_v3_v3v3fl(location, ray_start, ray_normal, *depth); | madd_v3_v3v3fl(location, ray_start, ray_normal, *depth); | ||||
| for (int j = 0; j < 3; j++) { | for (int j = 0; j < 3; j++) { | ||||
| if (len_squared_v3v3(location, v_tri[j]->co) < | if (j == 0 || len_squared_v3v3(location, v_tri[j]->co) < | ||||
| len_squared_v3v3(location, nearest_vertex_co)) { | len_squared_v3v3(location, nearest_vertex_co)) { | ||||
| copy_v3_v3(nearest_vertex_co, v_tri[j]->co); | copy_v3_v3(nearest_vertex_co, v_tri[j]->co); | ||||
| r_active_vertex->i = (intptr_t)v_tri[j]; | r_active_vertex->i = (intptr_t)v_tri[j]; | ||||
| } | } | ||||
| Context not available. | |||||