diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-08-13 06:23:45 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-08-13 06:33:03 +0300 |
commit | ed38d0c25da27c8fe6b3db76dbe024f33f82e338 (patch) | |
tree | 12bda6b67f13ed9b82f1a64dc1331f18823ed703 /source/blender/blenkernel/BKE_mesh.h | |
parent | 399b6ec76c80a8f343747a0459bb3d3df514555f (diff) |
Cleanup: split BKE_mesh_calc_normals_poly function in two
Remove the 'only_face_normals' argument.
- BKE_mesh_calc_normals_poly for polygon normals.
- BKE_mesh_calc_normals_poly_and_vertex for poly and vertex normals.
Order arguments logically:
- Pair array and length arguments.
- Position normal array arguments (to be filled) last.
Diffstat (limited to 'source/blender/blenkernel/BKE_mesh.h')
-rw-r--r-- | source/blender/blenkernel/BKE_mesh.h | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/source/blender/blenkernel/BKE_mesh.h b/source/blender/blenkernel/BKE_mesh.h index ef1384c804b..4eb3e6a3136 100644 --- a/source/blender/blenkernel/BKE_mesh.h +++ b/source/blender/blenkernel/BKE_mesh.h @@ -305,15 +305,21 @@ void BKE_mesh_calc_normals_mapping_ex(struct MVert *mverts, const int *origIndexFace, float (*r_faceNors)[3], const bool only_face_normals); -void BKE_mesh_calc_normals_poly(struct MVert *mverts, - float (*r_vertnors)[3], - int numVerts, +void BKE_mesh_calc_normals_poly(const struct MVert *mvert, + int mvert_len, const struct MLoop *mloop, - const struct MPoly *mpolys, - int numLoops, - int numPolys, - float (*r_polyNors)[3], - const bool only_face_normals); + int mloop_len, + const struct MPoly *mpoly, + int mpoly_len, + float (*r_poly_normals)[3]); +void BKE_mesh_calc_normals_poly_and_vertex(struct MVert *mvert, + int mvert_len, + const struct MLoop *mloop, + int mloop_len, + const struct MPoly *mpolys, + int mpoly_len, + float (*r_poly_normals)[3], + float (*r_vert_normals)[3]); void BKE_mesh_calc_normals(struct Mesh *me); void BKE_mesh_ensure_normals(struct Mesh *me); void BKE_mesh_ensure_normals_for_display(struct Mesh *mesh); |