[Bf-blender-cvs] [f5471435336] soc-2021-adaptive-cloth: adaptive_cloth: Mesh: get_checked_element()

ishbosamiya noreply at git.blender.org
Mon Jul 12 08:23:47 CEST 2021


Commit: f547143533684e8064c38b051d9728acb20f189d
Author: ishbosamiya
Date:   Wed Jul 7 19:15:15 2021 +0530
Branches: soc-2021-adaptive-cloth
https://developer.blender.org/rBf547143533684e8064c38b051d9728acb20f189d

adaptive_cloth: Mesh: get_checked_element()

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

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 1979b0dc2ab..d9b0f067561 100644
--- a/source/blender/blenkernel/BKE_cloth_remesh.hh
+++ b/source/blender/blenkernel/BKE_cloth_remesh.hh
@@ -1550,6 +1550,46 @@ template<typename END, typename EVD, typename EED, typename EFD> class Mesh {
 
     return std::move(face);
   }
+
+  /**
+   * Get checked node
+   */
+  inline auto &get_checked_node(NodeIndex node_index)
+  {
+    auto op_node = this->nodes.get(node_index);
+    BLI_assert(op_node);
+    return op_node.value().get();
+  }
+
+  /**
+   * Get checked vert
+   */
+  inline auto &get_checked_vert(VertIndex vert_index)
+  {
+    auto op_vert = this->verts.get(vert_index);
+    BLI_assert(op_vert);
+    return op_vert.value().get();
+  }
+
+  /**
+   * Get checked edge
+   */
+  inline auto &get_checked_edge(EdgeIndex edge_index)
+  {
+    auto op_edge = this->edges.get(edge_index);
+    BLI_assert(op_edge);
+    return op_edge.value().get();
+  }
+
+  /**
+   * Get checked face
+   */
+  inline auto &get_checked_face(FaceIndex face_index)
+  {
+    auto op_face = this->faces.get(face_index);
+    BLI_assert(op_face);
+    return op_face.value().get();
+  }
 };
 
 template<typename END, typename EVD, typename EED, typename EFD> class MeshDiff {



More information about the Bf-blender-cvs mailing list