【发布时间】:2017-01-03 23:13:01
【问题描述】:
我正在尝试使用 boost:: boost::geometry::index::rtree 上的 boost::geometry::index::nearest 查询来计算 3 维空间中另一个段的最近段,但我收到以下编译错误:
错误 C2664:'boost::mpl::assertion_failed':无法转换参数 1 来自 'boost::mpl::failed ************(__cdecl boost::geometry::nyi::not_implemented_error::THIS_OPERATION_IS_NOT_OR_NOT_YET_IMPLEMENTED::* ***********)(boost::mpl::assert_::types)' 到 'boost::mpl::assert::type'
我已设法将同一问题缩小到仅使用 boost::geometry::distance 函数:
typedef boost::geometry::model::point <float, 3, boost::geometry::cs::cartesian> point;
typedef boost::geometry::model::segment <point> segment;
point pa = point(x1, y1, z1);
point pc = point(x2, y2, z2);
point pb = point(x3, y3, z3);
float dist = boost::geometry::distance(segment(pa, pb), segment(pa, pc));
根据我正在使用的 Boost 版本 (1.60) 的文档,这应该是受支持的,但是在使用二维时它工作得很好。
我在文档中找不到任何关于如何扩展功能或是否有可能的信息。
【问题讨论】:
标签: c++ boost boost-geometry