[Bf-blender-cvs] [47110320239] soc-2020-soft-body: added buffer to embedding
mattoverby
noreply at git.blender.org
Wed Aug 19 19:15:14 CEST 2020
Commit: 47110320239329f1f79f21225fc8f2647ac32cd5
Author: mattoverby
Date: Wed Aug 19 12:15:10 2020 -0500
Branches: soc-2020-soft-body
https://developer.blender.org/rB47110320239329f1f79f21225fc8f2647ac32cd5
added buffer to embedding
===================================================================
M extern/softbody/src/admmpd_bvh.cpp
===================================================================
diff --git a/extern/softbody/src/admmpd_bvh.cpp b/extern/softbody/src/admmpd_bvh.cpp
index b9e49a29668..e56729c579f 100644
--- a/extern/softbody/src/admmpd_bvh.cpp
+++ b/extern/softbody/src/admmpd_bvh.cpp
@@ -267,9 +267,14 @@ void Octree<T,DIM>::init(const MatrixXT *V, const Eigen::MatrixXi *F, int stopde
boxes[i].extend(V->row(f[0]).transpose());
boxes[i].extend(V->row(f[1]).transpose());
boxes[i].extend(V->row(f[2]).transpose());
+ boxes[i].extend(boxes[i].min()-VecType::Ones()*1e-4);
+ boxes[i].extend(boxes[i].max()+VecType::Ones()*1e-4);
global_box.extend(boxes[i]);
}
+ global_box.extend(global_box.min()-VecType::Ones()*1e-2);
+ global_box.extend(global_box.max()+VecType::Ones()*1e-2);
+
T halfwidth = global_box.sizes().maxCoeff()*0.5;
m_root.reset(
create_children(global_box.center(),halfwidth,stopdepth,V,F,queue,boxes)
More information about the Bf-blender-cvs
mailing list