[Bf-blender-cvs] [059fe4ff63d] soc-2021-adaptive-cloth: adaptive_cloth: Mesh: make get_edge_indices_of_face() as protected

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


Commit: 059fe4ff63d8d58a1f49ccf83edb3952cb474485
Author: ishbosamiya
Date:   Thu Jul 22 17:23:00 2021 +0530
Branches: soc-2021-adaptive-cloth
https://developer.blender.org/rB059fe4ff63d8d58a1f49ccf83edb3952cb474485

adaptive_cloth: Mesh: make get_edge_indices_of_face() as protected

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

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 5ca194cda51..a78a150ec5f 100644
--- a/source/blender/blenkernel/BKE_cloth_remesh.hh
+++ b/source/blender/blenkernel/BKE_cloth_remesh.hh
@@ -2299,6 +2299,35 @@ template<typename END, typename EVD, typename EED, typename EFD> class Mesh {
     return this->get_checked_vert(vert_3_index);
   }
 
+  /**
+   * Get the edge indices of the `Face`
+   */
+  blender::Vector<EdgeIndex> get_edge_indices_of_face(const Face<EFD> &face) const
+  {
+    blender::Vector<EdgeIndex> edge_indices;
+    auto vert_1_index = face.verts[0];
+    auto vert_2_index = face.verts[0];
+    for (auto i = 1; i <= face.verts.size(); i++) {
+      vert_1_index = vert_2_index;
+      if (i == face.verts.size()) {
+        vert_2_index = face.verts[0];
+      }
+      else {
+        vert_2_index = face.verts[i];
+      }
+
+      auto op_edge_index = this->get_connecting_edge_index(vert_1_index, vert_2_index);
+      BLI_assert(op_edge_index);
+      auto edge_index = op_edge_index.value();
+
+      edge_indices.append(std::move(edge_index));
+    }
+
+    BLI_assert(edge_indices.size() == face.verts.size());
+
+    return edge_indices;
+  }
+
  private:
   /* all private static methods */
   /* all private non-static methods */
@@ -2616,35 +2645,6 @@ template<typename END, typename EVD, typename EED, typename EFD> class Mesh {
     return true;
   }
 
-  /**
-   * Get the edge indices of the `Face`
-   */
-  blender::Vector<EdgeIndex> get_edge_indices_of_face(const Face<EFD> &face) const
-  {
-    blender::Vector<EdgeIndex> edge_indices;
-    auto vert_1_index = face.verts[0];
-    auto vert_2_index = face.verts[0];
-    for (auto i = 1; i <= face.verts.size(); i++) {
-      vert_1_index = vert_2_index;
-      if (i == face.verts.size()) {
-        vert_2_index = face.verts[0];
-      }
-      else {
-        vert_2_index = face.verts[i];
-      }
-
-      auto op_edge_index = this->get_connecting_edge_index(vert_1_index, vert_2_index);
-      BLI_assert(op_edge_index);
-      auto edge_index = op_edge_index.value();
-
-      edge_indices.append(std::move(edge_index));
-    }
-
-    BLI_assert(edge_indices.size() == face.verts.size());
-
-    return edge_indices;
-  }
-
   /**
    * Remove this `Face`s from the `Edge`s formed by the `Vert`s of
    * this `Face`.



More information about the Bf-blender-cvs mailing list