From 21f50ceadfc3b49a4283e15fca3271b5d5fd1051 Mon Sep 17 00:00:00 2001 From: Sylvain Thery Date: Mon, 29 Apr 2024 14:48:18 +0200 Subject: [PATCH] bugfix BB too small --- cgogn/modeling/skeleton_sampling.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/cgogn/modeling/skeleton_sampling.h b/cgogn/modeling/skeleton_sampling.h index bd001101..2cdfd6a6 100644 --- a/cgogn/modeling/skeleton_sampling.h +++ b/cgogn/modeling/skeleton_sampling.h @@ -318,9 +318,12 @@ class SkeletonSampler std::cout << "BB: [" << bb_min_.transpose() << " - " << bb_max_.transpose() << "]" << std::endl; Epsilon = epsi == SCALAR(0) ? step / SCALAR(10) : epsi; + VEC3 min_bb = bb_min_; + VEC3 max_bb = bb_max_; + SCALAR s2 = step / 2; - VEC3 min_bb = bb_min_ + VEC3(s2, s2, s2); - VEC3 max_bb = bb_max_ - VEC3(s2, s2, s2); + bb_max_ += VEC3(s2, s2, s2); + bb_min_ -= VEC3(s2, s2, s2); int nbthr = std::thread::hardware_concurrency() / 3; SCALAR nstep = step * nbthr;