我有一个内置的助推树:
using CBGPoint3d = boost::geometry::model::point<float, 3, boost::geometry::cs::cartesian>;
using CBGBox3D = boost::geometry::model::box<CBGPoint3d>;
using CBGTreeItem = std::pair<CBGBox3D, CEntityLoaderBase*>;
boost::geometry::index::rtree<CBGTreeItem, boost::geometry::index::dynamic_rstar> m_tree;
我可以遍历叶节点:
for (auto const& v : m_tree)
//do something
我可以得到根界:
m_tree.bounds();
但是我怎样才能得到其他级别的界限呢?没有边界迭代器..。
发布于 2022-02-24 09:54:27
这不是官方界面的一部分,但可以手动遍历R树。您必须实现自己的节点访问者,并使用bgi::detail::rtree::utilities::view<Rtree>
将其应用于根节点。请看一下这个目录中的实用程序:
特别是在层次结构中检查边界框正确性的一项:
收集关于R-树内部结构的统计数据:
https://stackoverflow.com/questions/70711701
复制相似问题