Skip to content

Commit

Permalink
bugfix BB too small
Browse files Browse the repository at this point in the history
  • Loading branch information
sylvainthery committed Apr 29, 2024
1 parent 5c3744c commit 21f50ce
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions cgogn/modeling/skeleton_sampling.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 21f50ce

Please sign in to comment.