diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-05-10 14:07:01 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-05-10 14:07:01 +0400 |
commit | 4392fc6f1d4950ab0e0e60aae1bd5dea5baf26de (patch) | |
tree | 119985340414ffbbf749ef0ef41efdacf7cdd8c5 /source/blender/blenlib/BLI_math_geom.h | |
parent | a961b683fc62f893e70d9e0fbf80ed4d1e31b857 (diff) |
Optimize BKE_mesh_calc_normals(), gives approx 25% speedup.
- no need to allocate polygon normal array.
- no need to use BLI_array_ functions (realloc's).
- reduce some of the looping.
Diffstat (limited to 'source/blender/blenlib/BLI_math_geom.h')
-rw-r--r-- | source/blender/blenlib/BLI_math_geom.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/blenlib/BLI_math_geom.h b/source/blender/blenlib/BLI_math_geom.h index ad846823669..4ebb1a1a1d9 100644 --- a/source/blender/blenlib/BLI_math_geom.h +++ b/source/blender/blenlib/BLI_math_geom.h @@ -237,8 +237,8 @@ void accumulate_vertex_normals(float n1[3], float n2[3], float n3[3], float n4[3], const float f_no[3], const float co1[3], const float co2[3], const float co3[3], const float co4[3]); -void accumulate_vertex_normals_poly(float **vertnos, float polyno[3], - float **vertcos, float vdiffs[][3], int nverts); +void accumulate_vertex_normals_poly(float **vertnos, const float polyno[3], + const float **vertcos, float vdiffs[][3], const int nverts); /********************************* Tangents **********************************/ |