diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-07-22 20:49:37 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-07-22 20:49:37 +0400 |
commit | 90fdaa82195c2eb9b6412ffa8b4f4f70e16a35dc (patch) | |
tree | 189bcebbbd82c301f2a1ee4be9f6406fc9bf54f1 /source/blender/bmesh/intern/bmesh_polygon.h | |
parent | be7004237c2143ddf1811c2e4ba20e6f2eb1c7f8 (diff) |
optimization: lazy initialize EditDerivedBMesh members vertexNos, polyNos.
also add polyCos array which cache's face centers, gives overall ~20% speedup to drawing on a high-poly mesh in face-editmode.
Diffstat (limited to 'source/blender/bmesh/intern/bmesh_polygon.h')
-rw-r--r-- | source/blender/bmesh/intern/bmesh_polygon.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/bmesh/intern/bmesh_polygon.h b/source/blender/bmesh/intern/bmesh_polygon.h index 2f6b54b91d3..91fe94f8e48 100644 --- a/source/blender/bmesh/intern/bmesh_polygon.h +++ b/source/blender/bmesh/intern/bmesh_polygon.h @@ -34,16 +34,18 @@ int BM_face_calc_tessellation(BMFace *f, BMLoop **r_loops, int (*r_index)[3]) #endif ; void BM_face_calc_normal(BMFace *f, float r_no[3]); +void BM_face_calc_normal_vcos(BMesh *bm, BMFace *f, float r_no[3], + float const (*vertexCos)[3]); float BM_face_calc_area(BMFace *f); float BM_face_calc_perimeter(BMFace *f); void BM_face_calc_plane(BMFace *f, float r_plane[3]); void BM_face_calc_center_bounds(BMFace *f, float center[3]); void BM_face_calc_center_mean(BMFace *f, float center[3]); +void BM_face_calc_center_mean_vcos(BMesh *bm, BMFace *f, float r_cent[3], + float const (*vertexCos)[3]); void BM_face_calc_center_mean_weighted(BMFace *f, float center[3]); void BM_face_normal_update(BMFace *f); -void BM_face_normal_update_vcos(BMesh *bm, BMFace *f, float no[3], - float const (*vertexCos)[3]); void BM_edge_normals_update(BMEdge *e); |