[Bf-blender-cvs] [87e3b5a52b0] soc-2021-adaptive-cloth: adaptive_cloth: Mesh: is_edge_on_seam()

ishbosamiya noreply at git.blender.org
Mon Jul 26 08:17:42 CEST 2021


Commit: 87e3b5a52b03854b35f365bf787996947403c063
Author: ishbosamiya
Date:   Thu Jul 22 11:38:45 2021 +0530
Branches: soc-2021-adaptive-cloth
https://developer.blender.org/rB87e3b5a52b03854b35f365bf787996947403c063

adaptive_cloth: Mesh: is_edge_on_seam()

===================================================================

M	source/blender/blenkernel/BKE_cloth_remesh.hh

===================================================================

diff --git a/source/blender/blenkernel/BKE_cloth_remesh.hh b/source/blender/blenkernel/BKE_cloth_remesh.hh
index 858d4497b24..d4759c91d62 100644
--- a/source/blender/blenkernel/BKE_cloth_remesh.hh
+++ b/source/blender/blenkernel/BKE_cloth_remesh.hh
@@ -1872,6 +1872,25 @@ template<typename END, typename EVD, typename EED, typename EFD> class Mesh {
     return is_edge_loose(edge);
   }
 
+  /**
+   * Seam is the edge in UV space that has only one face.
+   *
+   * Note: A loose edge cannot be considered to be on a seam.
+   */
+  bool is_edge_on_seam(const Edge<EED> &edge) const
+  {
+    return edge.get_faces().size() == 1;
+  }
+
+  /**
+   * Easy call when only `edge_index` is available.
+   */
+  bool is_edge_on_seam(EdgeIndex edge_index) const
+  {
+    const auto &edge = this->get_checked_edge(edge_index);
+    return is_edge_on_boundary(edge);
+  }
+
   /**
    * Boundary is the set of "3D edges" that have only a single
    * face. Not all meshes will have a boundary.



More information about the Bf-blender-cvs mailing list