diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-01-29 19:05:23 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-01-29 19:05:23 +0400 |
commit | 2b875a947ff831dd8f7d4b5bc2d5df10f614864d (patch) | |
tree | 768be65da6d7433515bb17a4e2897c1ed30b32ef /source/blender/bmesh/tools/bmesh_triangulate.c | |
parent | d18fca88b9b292631b02fe98055372d4746866c3 (diff) |
skip calculating the normal for each face when triangulating, all callers make sure its valid. also remove some commented code (more then one generation of bmesh old).
Diffstat (limited to 'source/blender/bmesh/tools/bmesh_triangulate.c')
-rw-r--r-- | source/blender/bmesh/tools/bmesh_triangulate.c | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/source/blender/bmesh/tools/bmesh_triangulate.c b/source/blender/bmesh/tools/bmesh_triangulate.c index 7e6e41a12e6..9948a15ea56 100644 --- a/source/blender/bmesh/tools/bmesh_triangulate.c +++ b/source/blender/bmesh/tools/bmesh_triangulate.c @@ -30,7 +30,6 @@ #include "MEM_guardedalloc.h" #include "BLI_utildefines.h" -#include "BLI_array.h" #include "bmesh.h" @@ -40,27 +39,17 @@ void BM_mesh_triangulate(BMesh *bm, const bool use_beauty, const bool tag_only) { BMIter iter; BMFace *face; - float (*projectverts)[3] = NULL; - BLI_array_declare(projectverts); if (tag_only == false) { BM_ITER_MESH (face, &iter, bm, BM_FACES_OF_MESH) { - BLI_array_empty(projectverts); - BLI_array_reserve(projectverts, face->len * 3); - - BM_face_triangulate(bm, face, projectverts, NULL, use_beauty, false); + BM_face_triangulate(bm, face, NULL, use_beauty, false); } } else { BM_ITER_MESH (face, &iter, bm, BM_FACES_OF_MESH) { if (BM_elem_flag_test(face, BM_ELEM_TAG)) { - BLI_array_empty(projectverts); - BLI_array_grow_items(projectverts, face->len * 3); - - BM_face_triangulate(bm, face, projectverts, NULL, use_beauty, true); + BM_face_triangulate(bm, face, NULL, use_beauty, true); } } } - - BLI_array_free(projectverts); } |