Change to sampling: Take biggest triangle side as detail size on

intersection, since detail determines the maximum allowed triangle edge
size
This commit is contained in:
Antonis Ryakiotakis 2014-03-23 21:49:01 +02:00
parent 7a21330421
commit 7d64054798
1 changed files with 2 additions and 1 deletions

View File

@ -1073,7 +1073,8 @@ int BKE_pbvh_bmesh_node_raycast_detail(PBVHNode *node, const float ray_start[3],
len2 = len_v3v3(v_tri[1]->co, v_tri[2]->co);
len3 = len_v3v3(v_tri[2]->co, v_tri[0]->co);
*detail = (len1 + len2 + len3)/3.0f;
/* detail returned will be set to the maximum allowed size, so take max here */
*detail = max_fff(len1, len2, len3);
}
return hit;