fix degenerate case
This commit is contained in:
@@ -514,6 +514,10 @@ fn minimum_difference<const ENABLE_FAST_FAIL:bool,T>(
|
||||
// local new_point_q = queryQ(-initialAxis)
|
||||
// local direction, a0, a1, b0, b1, c0, c1, d0, d1
|
||||
let mut direction=mesh.hint_point()+rel_pos;
|
||||
// degenerate case
|
||||
if direction==vec3::zero(){
|
||||
direction=choose_any_direction();
|
||||
}
|
||||
let new_point=mesh.farthest_vert(direction);
|
||||
let mut simplex=Simplex::from_iter([new_point]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user