我正在尝试编译一个使用boost :: geometry :: within的程序,但是我收到以下错误:
/usr/include/boost/geometry/algorithms/within.hpp:实例化'bool boost :: geometry :: within(const Geometry1&,const Geometry2&)[with Geometry1 = legacy_point; Geometry2 = std :: vector]':glcanvas.cpp:1460:57:从这里需要/usr/include/boost/geometry/algorithms/within.hpp:295:55:错误:'apply'不是'的成员' boost :: geometry :: dispatch :: within,boost :: geometry :: point_tag,boost :: geometry :: multi_point_tag>
我的几何定义如下:
struct legacy_point{
float x, y, z;
};
BOOST_GEOMETRY_REGISTER_POINT_3D(legacy_point, float, cs::cartesian, x, y, z)
BOOST_GEOMETRY_REGISTER_MULTI_POINT(decltype(std::vector< legacy_point>{}))
我正在调用以下函数:
boost::geometry::within(point, conv_layer);
其中point
是legacy_point
类型,conv_layer
是legacy_point
的矢量。我可以使用boost :: geometry :: distance函数但是在内部得到上面的错误。