[Bf-blender-cvs] [151a8a38947] soc-2021-adaptive-cloth: adaptive_cloth: Mesh: is_edge_loose_or_on_seam_or_boundary()

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


Commit: 151a8a389479e01ba557ea1b1c4c467c298672c9
Author: ishbosamiya
Date:   Thu Jul 22 11:39:13 2021 +0530
Branches: soc-2021-adaptive-cloth
https://developer.blender.org/rB151a8a389479e01ba557ea1b1c4c467c298672c9

adaptive_cloth: Mesh: is_edge_loose_or_on_seam_or_boundary()

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

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 d4759c91d62..5ca194cda51 100644
--- a/source/blender/blenkernel/BKE_cloth_remesh.hh
+++ b/source/blender/blenkernel/BKE_cloth_remesh.hh
@@ -1921,6 +1921,24 @@ template<typename END, typename EVD, typename EED, typename EFD> class Mesh {
     return is_edge_on_boundary(edge);
   }
 
+  /**
+   * Easy call for checking all three conditions of the edge.
+   */
+  bool is_edge_loose_or_on_seam_or_boundary(const Edge<EED> &edge) const
+  {
+    return this->is_edge_on_seam(edge) || this->is_edge_on_boundary(edge) ||
+           this->is_edge_loose(edge);
+  }
+
+  /**
+   * Easy call when only `edge_index` is available.
+   */
+  bool is_edge_loose_or_on_seam_or_boundary(EdgeIndex edge_index) const
+  {
+    const auto &edge = this->get_checked_edge(edge_index);
+    return is_edge_loose_or_on_seam_or_boundary(edge);
+  }
+
   /**
    * An edge is flippable only if the edge has exactly 2 faces, and
    * both faces are triangulated.



More information about the Bf-blender-cvs mailing list