【发布时间】:2014-05-22 09:36:21
【问题描述】:
我是 boost::geometry 和 C++ 的新手,在玩弄它时,我想到了以下问题:
是否可以将附加信息直接存储在多边形内,例如包含颜色的 std::string 或带有一些 ID 号的 int?
还是我必须用类似的东西包装它:
MyPolygon {
typedef boost::geometry::model::d2::point_xy<double> point_2d;
typedef boost::geometry::model::polygon<point_2d> polygon_2d;
polygon_2d poly;
std::string color;
int id;
etc...
}
谢谢!
弗兰兹
【问题讨论】:
标签: c++ boost geometry polygon boost-geometry