本文整理汇总了C++中geolib::GEOObjects::getPolylineVecObj方法的典型用法代码示例。如果您正苦于以下问题:C++ GEOObjects::getPolylineVecObj方法的具体用法?C++ GEOObjects::getPolylineVecObj怎么用?C++ GEOObjects::getPolylineVecObj使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类geolib::GEOObjects
的用法示例。
在下文中一共展示了GEOObjects::getPolylineVecObj方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: checkPolylineProperties
void checkPolylineProperties()
{
const GeoLib::PolylineVec *line_vec = geo_objects.getPolylineVecObj(geo_name);
auto const readerLines = geo_objects.getPolylineVec(geo_name);
EXPECT_EQ(5u, readerLines->size());
auto checkPolylineProperty = [this](GeoLib::PolylineVec const* line_vec,
std::size_t ply_id, std::vector<std::size_t> pnt_ids,
std::string const& name)
{
auto const lines = geo_objects.getPolylineVec(geo_name);
GeoLib::Polyline* line = (*lines)[ply_id];
EXPECT_EQ(pnt_ids.size(), line->getNumberOfPoints());
for (std::size_t k(0); k<pnt_ids.size(); ++k)
EXPECT_EQ(pnt_ids[k], line->getPointID(k));
std::string line_name;
line_vec->getNameOfElementByID(ply_id, line_name);
EXPECT_EQ(name, line_name);
};
checkPolylineProperty(line_vec, 0, {0, 1, 2}, "left");
checkPolylineProperty(line_vec, 1, {3, 4, 5}, "center");
checkPolylineProperty(line_vec, 2, {0, 3}, "line1");
checkPolylineProperty(line_vec, 3, {3, 6}, "line2");
checkPolylineProperty(line_vec, 4, {6, 7, 8}, "right");
}