From 6a8f781c688f238c6fa6be5a9a2ba688f0f778e6 Mon Sep 17 00:00:00 2001 From: Michael Tao Date: Fri, 21 Aug 2026 19:23:56 -0400 Subject: [PATCH] fix: update quiver spatial API and Conan TBB config --- conanfile.py | 3 +++ .../include/balsa/scene_graph/BVHData.hpp | 6 +++--- visualization/src/scene_graph/BVHData.cpp | 17 +++++++++-------- 3 files changed, 15 insertions(+), 11 deletions(-) diff --git a/conanfile.py b/conanfile.py index 39de197..97f8653 100644 --- a/conanfile.py +++ b/conanfile.py @@ -16,6 +16,9 @@ class Balsa(ConanFile): "onetbb/2022.0.0", ] + def configure(self): + self.options["hwloc"].shared = True + def generate(self): meson = MesonToolchain(self) meson.generate() diff --git a/visualization/include/balsa/scene_graph/BVHData.hpp b/visualization/include/balsa/scene_graph/BVHData.hpp index 112159c..c8f1751 100644 --- a/visualization/include/balsa/scene_graph/BVHData.hpp +++ b/visualization/include/balsa/scene_graph/BVHData.hpp @@ -113,9 +113,9 @@ class BVHData : public AbstractFeature { private: // ── BVH storage (one per K variant) ───────────────────────────── - quiver::spatial::BVH<3, 3> _bvh_3; - quiver::spatial::BVH<3, 9> _bvh_9; - quiver::spatial::BVH<3, 13> _bvh_13; + quiver::spatial::BVH _bvh_3; + quiver::spatial::BVH _bvh_9; + quiver::spatial::BVH _bvh_13; int _bvh_height = -1; diff --git a/visualization/src/scene_graph/BVHData.cpp b/visualization/src/scene_graph/BVHData.cpp index 2ff4483..cf6a005 100644 --- a/visualization/src/scene_graph/BVHData.cpp +++ b/visualization/src/scene_graph/BVHData.cpp @@ -18,13 +18,13 @@ namespace balsa::scene_graph { // ── Collect BVH node bounds at a given tree depth ─────────────────── -template +template static auto collect_bounds_at_depth( - const quiver::spatial::BVH &bvh, + const quiver::spatial::BVH &bvh, int target_depth) - -> std::vector> { + -> std::vector> { - using kdop_type = quiver::spatial::KDOP; + using kdop_type = quiver::spatial::KDOP; std::vector result; if (!bvh.is_built() || bvh.node_count() == 0) return result; @@ -56,7 +56,7 @@ static auto collect_bounds_at_depth( template static void set_kdop_wireframe( MeshData &mesh_data, - const std::vector> &bounds, + const std::vector> &bounds, float uniform_color[4]) { std::vector all_positions; @@ -161,19 +161,20 @@ void BVHData::rebuild_bvh(MeshData &mesh_data) { config.max_leaf_size = max_leaf_size; if (kdop_k == 3) { - _bvh_3 = quiver::spatial::make_bvh<2, 3, 3>(mesh, pos, config); + _bvh_3 = quiver::spatial::make_bvh(mesh, pos, config); _bvh_height = _bvh_3.height(); spdlog::info("Built AABB BVH: {} nodes, height {}", _bvh_3.node_count(), _bvh_height); } else if (kdop_k == 9) { - _bvh_9 = quiver::spatial::make_bvh<2, 3, 9>(mesh, pos, config); + _bvh_9 = quiver::spatial::make_bvh(mesh, pos, config); _bvh_height = _bvh_9.height(); spdlog::info("Built 9-DOP BVH: {} nodes, height {}", _bvh_9.node_count(), _bvh_height); } else { - _bvh_13 = quiver::spatial::make_bvh<2, 3, 13>(mesh, pos, config); + _bvh_13 = + quiver::spatial::make_bvh(mesh, pos, config); _bvh_height = _bvh_13.height(); spdlog::info("Built 13-DOP BVH: {} nodes, height {}", _bvh_13.node_count(),