[Bf-blender-cvs] [9457c541a55] soc-2021-adaptive-cloth: adaptive_cloth: mesh: add empty elements
ishbosamiya
noreply at git.blender.org
Mon Jun 28 08:28:21 CEST 2021
Commit: 9457c541a55bfe8ab2cf6c3e34f7740c0c08e55a
Author: ishbosamiya
Date: Tue Jun 22 12:25:40 2021 +0530
Branches: soc-2021-adaptive-cloth
https://developer.blender.org/rB9457c541a55bfe8ab2cf6c3e34f7740c0c08e55a
adaptive_cloth: mesh: add empty elements
===================================================================
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 87631e68031..53f56a4252d 100644
--- a/source/blender/blenkernel/BKE_cloth_remesh.hh
+++ b/source/blender/blenkernel/BKE_cloth_remesh.hh
@@ -218,6 +218,37 @@ template<typename END, typename EVD, typename EED, typename EFD> class Mesh {
private:
/* all private static methods */
/* all private non-static methods */
+
+ Node<END> &add_empty_node(float3 pos, float3 normal)
+ {
+ auto node_index = this->nodes.insert_with(
+ [=](NodeIndex index) { return Node<END>(index, pos, normal); });
+
+ return this->nodes.get(node_index);
+ }
+
+ Vert<EVD> &add_empty_vert(float2 uv)
+ {
+ auto vert_index = this->verts.insert_with(
+ [=](VertIndex index) { return Vert<EVD>(index, uv); });
+
+ return this->verts.get(vert_index);
+ }
+
+ Edge<EED> &add_empty_edge()
+ {
+ auto edge_index = this->edges.insert_with([=](EdgeIndex index) { return Edge<EED>(index); });
+
+ return this->edges.get(edge_index);
+ }
+
+ Face<EFD> &add_empty_face(float3 normal)
+ {
+ auto face_index = this->faces.insert_with(
+ [=](FaceIndex index) { return Face<EFD>(index, normal); });
+
+ return this->faces.get(face_index);
+ }
};
} /* namespace blender::bke::internal */
More information about the Bf-blender-cvs
mailing list