我正在尝试使用 Clipper 库来扩展我的避障机器人控制任务中的障碍物图像。但现在,我什至坚持使用库的示例代码:
(http://www.angusj.com/delphi/clipper.php#code)
包括“clipper.hpp”
//from clipper.hpp ...
//typedef signed long long long64;
//struct IntPoint {long64 X; long64 Y;};
//typedef std::vector<IntPoint> Polygon;
//typedef std::vector<Polygon> Polygons;
...
using namespace ClipperLib;
Polygons subj(2), clip(1), solution;
subj[0].push_back(IntPoint(180,200));
subj[0].push_back(IntPoint(260,200));
subj[0].push_back(IntPoint(260,150));
subj[0].push_back(IntPoint(180,150));
subj[1].push_back(IntPoint(215,160));
subj[1].push_back(IntPoint(230,190));
subj[1].push_back(IntPoint(200,190));
clip[0].push_back(IntPoint(190,210));
clip[0].push_back(IntPoint(240,210));
clip[0].push_back(IntPoint(240,130));
clip[0].push_back(IntPoint(190,130));
DrawPolygons(subj, 0x160000FF, 0x600000FF); // <- identifier not found
DrawPolygons(clip, 0x20FFFF00, 0x30FF0000); // <- identifier not found
Clipper c;
c.AddPolygons(subject, ptSubject);
c.AddPolygons(clip, ptClip);
if (c.Execute(ctIntersection, solution)
DrawPolygons(solution, 0x3000FF00, 0xFF006600);
我想知道我是否缺少任何库安装?我知道这是一个小问题,而且我有点新手,但任何帮助都可以减轻我的很多工作。谢谢!