[Bf-blender-cvs] [57e374f0895] soc-2021-adaptive-cloth: adaptive_cloth: VertData: initial implementation
ishbosamiya
noreply at git.blender.org
Mon Jul 19 17:35:44 CEST 2021
Commit: 57e374f089561b07f911d1465459203ec79233ae
Author: ishbosamiya
Date: Fri Jul 16 21:58:27 2021 +0530
Branches: soc-2021-adaptive-cloth
https://developer.blender.org/rB57e374f089561b07f911d1465459203ec79233ae
adaptive_cloth: VertData: initial implementation
Used to store extra `Vert` data in the `Mesh`.
===================================================================
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 989cbc2d70e..eafe6fda1f6 100644
--- a/source/blender/blenkernel/intern/cloth_remesh.cc
+++ b/source/blender/blenkernel/intern/cloth_remesh.cc
@@ -36,6 +36,8 @@
namespace blender::bke {
class NodeData;
+class VertData;
+class Sizing;
template<typename T> static inline T simple_interp(const T &a, const T &b)
{
@@ -111,6 +113,34 @@ class NodeData {
}
};
+class Sizing {
+ float2x2 m; /* in [1], the "sizing" tensor field given as `M` */
+
+ public:
+ Sizing(float2x2 &&m) : m(m)
+ {
+ }
+
+ const auto &get_m() const
+ {
+ return this->m;
+ }
+};
+
+class VertData {
+ Sizing sizing; /* in [1], this is the "sizing" of the verts */
+
+ public:
+ VertData(Sizing &&sizing) : sizing(sizing)
+ {
+ }
+
+ const auto &get_sizing() const
+ {
+ return this->sizing;
+ }
+};
+
Mesh *BKE_cloth_remesh(Object *ob, ClothModifierData *clmd, Mesh *mesh)
{
auto *cloth_to_object_res = cloth_to_object(ob, clmd, mesh, false);
More information about the Bf-blender-cvs
mailing list