Эх сурвалжийг харах

fix issue for octree. (#1171)

For translating centre, the distance should be the half of width of the sub cell instead of the width h.
X.ZhaoMa 6 жил өмнө
parent
commit
fbcb933c5b

+ 1 - 1
include/igl/octree.cpp

@@ -106,7 +106,7 @@ namespace igl {
         for(ChildrenType i = 0; i < 8; i++){
           children.emplace_back(neg_ones);
           point_indices.emplace_back(std::vector<IndexType>());
-          centers.emplace_back(translate_center(curr_center,h,i));
+          centers.emplace_back(translate_center(curr_center,h/2,i));
           widths.emplace_back(h);
         }