Skip to content

Commit

Permalink
Fix for issue #65.
Browse files Browse the repository at this point in the history
The mini-tree builder now accepts configurations with `min_leaf_size > 1`.
  • Loading branch information
madmann91 committed Oct 2, 2023
1 parent ad3d436 commit 02ee929
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/bvh/v2/mini_tree_builder.h
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ class MiniTreeBuilder {
}

typename SweepSahBuilder<Node>::Config config = config_;
config.max_leaf_size = 1; // Needs to have only one mini-tree in each leaf
config.max_leaf_size = config.min_leaf_size = 1; // Needs to have only one mini-tree in each leaf
auto bvh = SweepSahBuilder<Node>::build(bboxes, centers, config);

// Compute the offsets to apply to primitive and node indices
Expand Down
1 change: 1 addition & 0 deletions src/bvh/v2/top_down_sah_builder.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ class TopDownSahBuilder {
, config_(config)
{
assert(bboxes.size() == centers.size());
assert(config.min_leaf_size <= config.max_leaf_size);
}

virtual std::vector<size_t>& get_prim_ids() = 0;
Expand Down

0 comments on commit 02ee929

Please sign in to comment.