diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-06-20 06:47:53 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-06-20 07:39:13 +0300 |
commit | 2d60c496a200288f100c11845ccb196f04e45ba3 (patch) | |
tree | 4f115960d47a2ec92fd584d746da3a9182c87082 /source/blender/bmesh | |
parent | 513f566b40a5bde4d89797aecf7c0ad3e4d1a20b (diff) |
Mesh: minor optimization to concave quad check for tessellation
Use the face normal (when available) for a faster concave quad test.
Diffstat (limited to 'source/blender/bmesh')
-rw-r--r-- | source/blender/bmesh/intern/bmesh_mesh_tessellate.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/bmesh/intern/bmesh_mesh_tessellate.c b/source/blender/bmesh/intern/bmesh_mesh_tessellate.c index 18ec83057e2..c9b027474e1 100644 --- a/source/blender/bmesh/intern/bmesh_mesh_tessellate.c +++ b/source/blender/bmesh/intern/bmesh_mesh_tessellate.c @@ -95,8 +95,11 @@ BLI_INLINE void bmesh_calc_tessellation_for_face_impl(BMLoop *(*looptris)[3], efa->no, l_ptr_a[0]->v->co, l_ptr_a[1]->v->co, l_ptr_a[2]->v->co, l_ptr_b[2]->v->co); } - if (UNLIKELY(is_quad_flip_v3_first_third_fast( - l_ptr_a[0]->v->co, l_ptr_a[1]->v->co, l_ptr_a[2]->v->co, l_ptr_b[2]->v->co))) { + if (UNLIKELY(is_quad_flip_v3_first_third_fast_with_normal(l_ptr_a[0]->v->co, + l_ptr_a[1]->v->co, + l_ptr_a[2]->v->co, + l_ptr_b[2]->v->co, + efa->no))) { /* Flip out of degenerate 0-2 state. */ l_ptr_a[2] = l_ptr_b[2]; l_ptr_b[0] = l_ptr_a[1]; |