[Bf-blender-cvs] [790f69d1229] soc-2021-adaptive-cloth: adaptive_cloth: AdaptiveMesh: VertData: add flag

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


Commit: 790f69d122953b6a5698f94d12dfe3a5176e0f3c
Author: ishbosamiya
Date:   Mon Jul 19 22:00:19 2021 +0530
Branches: soc-2021-adaptive-cloth
https://developer.blender.org/rB790f69d122953b6a5698f94d12dfe3a5176e0f3c

adaptive_cloth: AdaptiveMesh: VertData: add flag

Add flag to be able to tag the `Vert`.

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

M	source/blender/blenkernel/intern/cloth_remesh.cc

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

diff --git a/source/blender/blenkernel/intern/cloth_remesh.cc b/source/blender/blenkernel/intern/cloth_remesh.cc
index 01c0fccb1e7..9215c2bb910 100644
--- a/source/blender/blenkernel/intern/cloth_remesh.cc
+++ b/source/blender/blenkernel/intern/cloth_remesh.cc
@@ -158,12 +158,19 @@ class Sizing {
   }
 };
 
+enum VertFlags {
+  VERT_NONE = 0,
+  VERT_SELECTED = 1 << 0,
+};
+
 class VertData {
   Sizing sizing; /* in [1], this is the "sizing" of the verts */
+  int flag;
 
  public:
   VertData(Sizing sizing) : sizing(sizing)
   {
+    this->flag = VERT_NONE;
   }
 
   const auto &get_sizing() const
@@ -176,9 +183,20 @@ class VertData {
     this->sizing = sizing;
   }
 
+  const auto &get_flag() const
+  {
+    return this->flag;
+  }
+
+  auto &get_flag_mut()
+  {
+    return this->flag;
+  }
+
   VertData interp(const VertData &other) const
   {
     VertData res(this->get_sizing().interp(other.get_sizing()));
+    res.flag = VERT_NONE;
     return res;
   }
 };



More information about the Bf-blender-cvs mailing list