浏览代码

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 年之前
父节点
当前提交
fbcb933c5b
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      include/igl/octree.cpp

+ 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);
         }