Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Goudey <h.goudey@me.com>2022-10-03 07:34:27 +0300
committerHans Goudey <h.goudey@me.com>2022-10-03 07:34:27 +0300
commitc0f754d9b125543e590f0302e92085836d216f64 (patch)
tree4a1e52852bfd9c9111867c6c9302ac7dc7c6925b /source/blender/blenkernel/BKE_mesh_mapping.h
parentacb8ac6870e831b0ebf61cef79ff993e8849fc37 (diff)
parentcbfd2aaeb7806ee83b4b01215997ee310690dcb1 (diff)
Merge branch 'master' into refactor-mesh-position-generic
Diffstat (limited to 'source/blender/blenkernel/BKE_mesh_mapping.h')
-rw-r--r--source/blender/blenkernel/BKE_mesh_mapping.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_mesh_mapping.h b/source/blender/blenkernel/BKE_mesh_mapping.h
index 1ec7cca3042..12badd51dda 100644
--- a/source/blender/blenkernel/BKE_mesh_mapping.h
+++ b/source/blender/blenkernel/BKE_mesh_mapping.h
@@ -7,6 +7,10 @@
*/
#ifdef __cplusplus
+# include "BLI_array.hh"
+#endif
+
+#ifdef __cplusplus
extern "C" {
#endif
@@ -328,3 +332,19 @@ int *BKE_mesh_calc_smoothgroups(const struct MEdge *medge,
#ifdef __cplusplus
}
#endif
+
+#ifdef __cplusplus
+namespace blender::mesh_topology {
+
+Array<int> build_corner_to_poly_map(Span<MPoly> polys, int loops_num);
+
+Array<Vector<int>> build_vert_to_edge_map(Span<MEdge> edges, int verts_num);
+Array<Vector<int>> build_vert_to_corner_map(Span<MLoop> loops, int verts_num);
+
+inline int previous_poly_corner(const MPoly &poly, int corner_i)
+{
+ return corner_i - 1 + (corner_i == poly.loopstart) * poly.totloop;
+}
+
+} // namespace blender::mesh_topology
+#endif