本文整理汇总了C++中Face_handle::data方法的典型用法代码示例。如果您正苦于以下问题:C++ Face_handle::data方法的具体用法?C++ Face_handle::data怎么用?C++ Face_handle::data使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Face_handle
的用法示例。
在下文中一共展示了Face_handle::data方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ApplyObjects
void ApplyObjects(Pmwx& ioMap)
{
if (gFAAObs.empty()) return;
Point_2 sw, ne;
CalcBoundingBox(ioMap, sw, ne);
// ioMap.Index();
int placed = 0;
// CGAL::Arr_landmarks_point_location<Arrangement_2> locator(gMap);
CGAL::Arr_walk_along_line_point_location<Arrangement_2> locator(gMap);
for (FAAObsTable::iterator i = gFAAObs.begin(); i != gFAAObs.end(); ++i)
{
if (i->second.kind != NO_VALUE)
{
Point_2 loc = Point_2(i->second.lon, i->second.lat);
DebugAssert(CGAL::is_valid(gMap));
CGAL::Object obj = locator.locate(loc);
Face_const_handle ff;
if(CGAL::assign(ff,obj))
{
Face_handle f = ioMap.non_const_handle(ff);
GISPointFeature_t feat;
feat.mFeatType = i->second.kind;
feat.mLocation = loc;
if (i->second.agl != DEM_NO_DATA)
feat.mParams[pf_Height] = i->second.agl;
feat.mInstantiated = false;
f->data().mPointFeatures.push_back(feat);
++placed;
#if 0
printf("Placed %s at %lf, %lf\n",
FetchTokenString(i->second.kind), i->second.lon, i->second.lat);
#endif
// if (v.size() > 1)
// fprintf(stderr,"WARNING (%d,%d): Point feature %lf, %lf matches multiple areas.\n",gMapWest, gMapSouth, CGAL::to_double(loc.x()), CGAL::to_double(loc.y()));
}
}
}
printf("Placed %d objects.\n", placed);
}